Sha256: 8d33b7c782d32cff6c4de376905eee449c18721175d1e6bc3c49319da6c6321d
Contents?: true
Size: 971 Bytes
Versions: 16
Compression:
Stored size: 971 Bytes
Contents
require 'spec_helper' module Rspec 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
16 entries across 16 versions & 1 rubygems