summary refs log tree commit diff
path: root/test
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2007-12-05 13:26:16 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2007-12-05 13:26:16 +0100
commit878d917713d943981757f4986ee287aa63ef6b18 (patch)
tree15f020c22c62a338a283cdf02295ccfb8e2d9221 /test
parent802468420c86f904e54d132d54a68189add5b220 (diff)
downloadbacon-878d917713d943981757f4986ee287aa63ef6b18.tar.gz
bacon-878d917713d943981757f4986ee287aa63ef6b18.tar.xz
bacon-878d917713d943981757f4986ee287aa63ef6b18.zip
Add identical_to/same_as
darcs-hash:20071205122616-4fc50-34f25320f27b4db25249d05e092ab2f87d9e40e7.gz
Diffstat (limited to 'test')
-rw-r--r--test/spec_bacon.rb8
1 files changed, 8 insertions, 0 deletions
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