Module: RSpec::Matchers::MatchAliases

Included in:
BuiltIn::BaseMatcher, BuiltIn::BeWithin, BuiltIn::Change, BuiltIn::Has, BuiltIn::Have, BuiltIn::RaiseError, BuiltIn::RespondTo, BuiltIn::Satisfy, BuiltIn::ThrowSymbol, BuiltIn::YieldSuccessiveArgs, BuiltIn::YieldWithArgs
Defined in:
lib/rspec/matchers/match_aliases.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) ==(other)

4
5
6
7
8
9
10
11
12
13
14
# File 'lib/rspec/matchers/match_aliases.rb', line 4
def ==(other)
  return true if equal?(other)
  matched = matches?(other)
  if matched
    RSpec.deprecate("Using `matcher == value` as an alias for `#matches?`", :replacement => "`matcher === value`")
  end
  matched
end

- (Object) ===(other)

16
17
18
# File 'lib/rspec/matchers/match_aliases.rb', line 16
def ===(other)
  matches?(other)
end