1 require File.dirname(__FILE__) + '/../../spec_helper.rb'
6 it "should match when actual.eql?(expected)" do
7 Eql.new(1).matches?(1).should be_true
9 it "should not match when !actual.eql?(expected)" do
10 Eql.new(1).matches?(2).should be_false
12 it "should describe itself" do
14 matcher.description.should == "eql 1"
16 it "should provide message, expected and actual on #failure_message" do
17 matcher = Eql.new("1")
19 matcher.failure_message.should == ["expected \"1\", got 1 (using .eql?)", "1", 1]
21 it "should provide message, expected and actual on #negative_failure_message" do
24 matcher.negative_failure_message.should == ["expected 1 not to equal 1 (using .eql?)", 1, 1]