Sha256: 1b3059d36f7556f19eedad5016c901cd5ea4fdef961619f050bd9daf61df60c9

Contents?: true

Size: 1017 Bytes

Versions: 44

Compression:

Stored size: 1017 Bytes

Contents

require 'spec_helper'

module RSpec
  module Matchers
    describe "eql" do
      it "is diffable" do
        eql(1).should be_diffable
      end

      it "matches when actual.eql?(expected)" do
        1.should eql(1)
      end
      
      it "does not match when !actual.eql?(expected)" do
        1.should_not eql(2)
      end
      
      it "describes itself" do
        matcher = eql(1)
        matcher.matches?(1)
        matcher.description.should == "eql 1"
      end
      
      it "provides 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 "provides 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

44 entries across 44 versions & 6 rubygems

Version Path
horseman-0.0.4 vendor/ruby/1.9.1/gems/rspec-expectations-2.7.0/spec/rspec/matchers/eql_spec.rb
horseman-0.0.3 vendor/ruby/1.9.1/gems/rspec-expectations-2.7.0/spec/rspec/matchers/eql_spec.rb
horseman-0.0.2 vendor/ruby/1.9.1/gems/rspec-expectations-2.7.0/spec/rspec/matchers/eql_spec.rb
nutshell-crm-0.0.6.alpha vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/eql_spec.rb
nutshell-crm-0.0.5 vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/eql_spec.rb
nutshell-crm-0.0.4 vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/eql_spec.rb
nutshell-crm-0.0.3 vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/eql_spec.rb
nutshell-crm-0.0.2 vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/eql_spec.rb
nutshell-crm-0.0.1 vendor/bundle/gems/rspec-expectations-2.7.0/spec/rspec/matchers/eql_spec.rb
rspec-expectations-2.7.0 spec/rspec/matchers/eql_spec.rb
rspec-expectations-2.7.0.rc1 spec/rspec/matchers/eql_spec.rb
messagebus_ruby_api-0.4.7 spec/ruby/1.9.1/gems/rspec-expectations-2.5.0/spec/rspec/matchers/eql_spec.rb
messagebus_ruby_api-0.4.4 spec/ruby/1.9.1/gems/rspec-expectations-2.5.0/spec/rspec/matchers/eql_spec.rb
rspec-expectations-2.6.0 spec/rspec/matchers/eql_spec.rb
rspec-expectations-2.6.0.rc6 spec/rspec/matchers/eql_spec.rb
rspec-expectations-2.6.0.rc4 spec/rspec/matchers/eql_spec.rb
rspec-expectations-2.6.0.rc2 spec/rspec/matchers/eql_spec.rb
rspec-expectations-2.5.0 spec/rspec/matchers/eql_spec.rb
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/rspec-expectations-2.1.0/spec/rspec/matchers/eql_spec.rb
rspec-expectations-2.4.0 spec/rspec/matchers/eql_spec.rb