Method: RSpec::Matchers::DSL#define_negated_matcher
- Defined in:
- lib/rspec/matchers/dsl.rb
#define_negated_matcher(negated_name, base_name) {|String| ... } ⇒ Object
Defines a negated matcher. The returned matcher's description
and failure_message
will be overridden to reflect the phrasing of the new name, and the match logic will
be based on the original matcher but negated.
61 62 63 |
# File 'lib/rspec/matchers/dsl.rb', line 61 def define_negated_matcher(negated_name, base_name, &description_override) alias_matcher(negated_name, base_name, :klass => AliasedNegatedMatcher, &description_override) end |