Sha256: ce75611da299dd09fd22778edbfff8ce9ca8ae172efb4e4675aca2a17c5be513

Contents?: true

Size: 970 Bytes

Versions: 32

Compression:

Stored size: 970 Bytes

Contents

require 'spec_helper'

module Spec
  module Matchers
    describe "eql" do
      it "should match when actual.eql?(expected)" do
        1.should eql(1)
      end
      
      it "should not match when !actual.eql?(expected)" do
        1.should_not eql(2)
      end
      
      it "should describe itself" do
        matcher = eql(1)
        matcher.matches?(1)
        matcher.description.should == "eql 1"
      end
      
      it "should provide message, expected and actual on #failure_message" do
        matcher = eql("1")
        matcher.matches?(1)
        matcher.failure_message_for_should.should == "\nexpected \"1\"\n     got 1\n\n(compared using eql?)\n"
      end
      
      it "should provide message, expected and actual on #negative_failure_message" do
        matcher = eql(1)
        matcher.matches?(1)
        matcher.failure_message_for_should_not.should == "\nexpected 1 not to equal 1\n\n(compared using eql?)\n"
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 11 rubygems

Version Path
rspec-instructure-1.3.3 spec/spec/matchers/eql_spec.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/rspec-1.3.2/spec/spec/matchers/eql_spec.rb
rspec-1.3.2 spec/spec/matchers/eql_spec.rb
rspec-1.3.1 spec/spec/matchers/eql_spec.rb
rspec-1.3.1.rc spec/spec/matchers/eql_spec.rb
rspec-1.3.0 spec/spec/matchers/eql_spec.rb
hubbub-0.0.11 lib/vendor/plugins/rspec/spec/spec/matchers/eql_spec.rb
hubbub-0.0.10 lib/vendor/plugins/rspec/spec/spec/matchers/eql_spec.rb
hubbub-0.0.9 lib/vendor/plugins/rspec/spec/spec/matchers/eql_spec.rb
hubbub-0.0.8 lib/vendor/plugins/rspec/spec/spec/matchers/eql_spec.rb
hubbub-0.0.6 lib/vendor/plugins/rspec/spec/spec/matchers/eql_spec.rb
simple-templater-0.0.1.4 gems/gems/rspec-1.2.9/spec/spec/matchers/eql_spec.rb
media-path-0.1.2 vendor/rspec/spec/spec/matchers/eql_spec.rb
simple-templater-0.0.1.3 vendor/rspec/spec/spec/matchers/eql_spec.rb
pupu-0.0.2.pre vendor/rspec/spec/spec/matchers/eql_spec.rb
media-path-0.1.1.pre vendor/rspec/spec/spec/matchers/eql_spec.rb
simple-templater-0.0.1.2 vendor/rspec/spec/spec/matchers/eql_spec.rb
media-path-0.1.1 vendor/rspec/spec/spec/matchers/eql_spec.rb
simple-templater-0.0.1.1 vendor/rspec/spec/spec/matchers/eql_spec.rb
pupu-0.0.2 vendor/rspec/spec/spec/matchers/eql_spec.rb