From 878d917713d943981757f4986ee287aa63ef6b18 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Wed, 5 Dec 2007 13:26:16 +0100 Subject: Add identical_to/same_as darcs-hash:20071205122616-4fc50-34f25320f27b4db25249d05e092ab2f87d9e40e7.gz --- test/spec_bacon.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/spec_bacon.rb b/test/spec_bacon.rb index 4760331..6847b9d 100644 --- a/test/spec_bacon.rb +++ b/test/spec_bacon.rb @@ -162,6 +162,14 @@ describe "Bacon" do # lambda { "string".should.not =~ "strin" }.should fail end + it "should have should.be.identical_to/same_as" do + lambda { s = "string"; s.should.be.identical_to s }.should succeed + lambda { "string".should.be.identical_to "string" }.should fail + + lambda { s = "string"; s.should.be.same_as s }.should succeed + lambda { "string".should.be.same_as "string" }.should fail + end + it "should have should.respond_to" do lambda { "foo".should.respond_to :to_s }.should succeed lambda { 5.should.respond_to :to_str }.should fail -- cgit 1.4.1