Sha256: a0765a6935df202e7d9066e3023771e2d867cf4dacd531b1230c955a557b74df

Contents?: true

Size: 402 Bytes

Versions: 5

Compression:

Stored size: 402 Bytes

Contents

module RSpec
  module Matchers
    module MatchAliases
      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

      def ===(other)
        matches?(other)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rspec-expectations-2.99.2 lib/rspec/matchers/match_aliases.rb
rspec-expectations-2.99.1 lib/rspec/matchers/match_aliases.rb
rspec-expectations-2.99.0 lib/rspec/matchers/match_aliases.rb
rspec-expectations-2.99.0.rc1 lib/rspec/matchers/match_aliases.rb
rspec-expectations-2.99.0.beta2 lib/rspec/matchers/match_aliases.rb