Class: Spec::Example::ExampleMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/vendor/plugins/rspec/lib/spec/example/example_matcher.rb

Instance Method Summary collapse

Constructor Details

#initialize(example_group_description, example_name) ⇒ ExampleMatcher

Returns a new instance of ExampleMatcher.



4
5
6
7
# File 'lib/vendor/plugins/rspec/lib/spec/example/example_matcher.rb', line 4

def initialize(example_group_description, example_name)
  @example_group_description = example_group_description
  @example_name = example_name
end

Instance Method Details

#matches?(specified_examples) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
13
# File 'lib/vendor/plugins/rspec/lib/spec/example/example_matcher.rb', line 9

def matches?(specified_examples)
  specified_examples.any? do |specified_example|
    matches_literal_example?(specified_example) || matches_example_not_considering_modules?(specified_example)
  end
end