Method: RSpec::Core::Metadata.relative_path_regex

Defined in:
lib/rspec/core/metadata.rb

.relative_path_regexvoid

Matches strings either at the beginning of the input or prefixed with a whitespace, containing the current path, either postfixed with the separator, or at the end of the string. Match groups are the character before and the character after the string if any.

http://rubular.com/r/fT0gmX6VJX http://rubular.com/r/duOrD4i3wb http://rubular.com/r/sbAMHFrOx1

[View source]

36
37
38
# File 'lib/rspec/core/metadata.rb', line 36

def self.relative_path_regex
  @relative_path_regex ||= /(\A|\s)#{File.expand_path('.')}(#{File::SEPARATOR}|\s|\Z)/
end