Class: SpecMatcher
Instance Method Summary collapse
-
#initialize(context_and_or_spec_name, context_name) ⇒ SpecMatcher
constructor
A new instance of SpecMatcher.
- #matches?(spec_name) ⇒ Boolean
Constructor Details
#initialize(context_and_or_spec_name, context_name) ⇒ SpecMatcher
Returns a new instance of SpecMatcher.
3 4 5 6 |
# File 'lib/spec/runner/spec_matcher.rb', line 3 def initialize(context_and_or_spec_name, context_name) @context_name = context_name @name_to_match = context_and_or_spec_name end |
Instance Method Details
#matches?(spec_name) ⇒ Boolean
8 9 10 11 12 |
# File 'lib/spec/runner/spec_matcher.rb', line 8 def matches?(spec_name) return true if matches_context? && (matches_spec?(spec_name) || context_only?) return true if matches_spec?(spec_name) && spec_only?(spec_name) return false end |