Sha256: 5f15f7b53239f7ba4c104bf372fa2e10f7ad8a7e042f5784791ba8d33f635aac

Contents?: true

Size: 825 Bytes

Versions: 39

Compression:

Stored size: 825 Bytes

Contents

module RSpec
  module Matchers
    module BuiltIn
      # @api private
      # Provides the implementation for `eql`.
      # Not intended to be instantiated directly.
      class Eql < BaseMatcher
        # @api private
        # @return [String]
        def failure_message
          "\nexpected: #{expected.inspect}\n     got: #{actual.inspect}\n\n(compared using eql?)\n"
        end

        # @api private
        # @return [String]
        def failure_message_when_negated
          "\nexpected: value != #{expected.inspect}\n     got: #{actual.inspect}\n\n(compared using eql?)\n"
        end

        # @api private
        # @return [Boolean]
        def diffable?
          true
        end

      private

        def match(expected, actual)
          actual.eql? expected
        end
      end
    end
  end
end

Version data entries

39 entries across 36 versions & 10 rubygems

Version Path
opal-rspec-0.8.0 rspec-expectations/upstream/lib/rspec/matchers/built_in/eql.rb
opal-rspec-0.8.0.alpha3 rspec-expectations/upstream/lib/rspec/matchers/built_in/eql.rb
opal-rspec-0.8.0.alpha2 rspec-expectations/upstream/lib/rspec/matchers/built_in/eql.rb
opal-rspec-0.8.0.alpha1 rspec-expectations/upstream/lib/rspec/matchers/built_in/eql.rb
opal-rspec-0.7.1 rspec-expectations/upstream/lib/rspec/matchers/built_in/eql.rb
opal-rspec-0.7.0 rspec-expectations/upstream/lib/rspec/matchers/built_in/eql.rb
opal-rspec-0.6.2 rspec-expectations/lib/rspec/matchers/built_in/eql.rb
opal-rspec-0.7.0.rc.2 rspec-expectations/upstream/lib/rspec/matchers/built_in/eql.rb
opal-rspec-0.6.1 rspec-expectations/lib/rspec/matchers/built_in/eql.rb
opal-rspec-0.6.0 rspec-expectations/lib/rspec/matchers/built_in/eql.rb
opal-rspec-0.6.0.beta1 rspec-expectations/lib/rspec/matchers/built_in/eql.rb
opal-connect-rspec-0.5.0 rspec-expectations/lib/rspec/matchers/built_in/eql.rb
able-neo4j-1.0.0 vendor/bundle/jruby/1.9/gems/rspec-expectations-3.1.2/lib/rspec/matchers/built_in/eql.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/rspec-expectations-3.1.0/lib/rspec/matchers/built_in/eql.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/rspec-expectations-3.1.0/lib/rspec/matchers/built_in/eql.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/rspec-expectations-3.1.0/lib/rspec/matchers/built_in/eql.rb
opal-rspec-0.5.0 rspec-expectations/lib/rspec/matchers/built_in/eql.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/logstash-codec-json-2.0.3/vendor/gems/rspec-expectations-3.1.2/lib/rspec/matchers/built_in/eql.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/rspec-expectations-3.1.2/lib/rspec/matchers/built_in/eql.rb
logstash-codec-json-2.0.3 vendor/gems/rspec-expectations-3.1.2/lib/rspec/matchers/built_in/eql.rb