Class: Spec::Example::ExampleMatcher
- Defined in:
- lib/spec/example/example_matcher.rb
Instance Method Summary collapse
-
#initialize(example_group_description, example_name) ⇒ ExampleMatcher
constructor
A new instance of ExampleMatcher.
- #matches?(specified_examples) ⇒ Boolean
Constructor Details
#initialize(example_group_description, example_name) ⇒ ExampleMatcher
Returns a new instance of ExampleMatcher.
4 5 6 7 |
# File '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
9 10 11 12 13 14 |
# File 'lib/spec/example/example_matcher.rb', line 9 def matches?(specified_examples) specified_examples.each do |specified_example| return true if matches_literal_example?(specified_example) || matches_example_not_considering_modules?(specified_example) end false end |