public
Description: Behaviour Driven Development framework for Ruby
Homepage: http://rspec.info
Clone URL: git://github.com/dchelimsky/rspec.git
Click here to lend your support to: rspec and make a donation at www.pledgie.com !
one more null_object example
dchelimsky (author)
Mon Aug 11 04:37:01 -0700 2008
commit  2dd5c1bec6b8a9507efd28badba5ad5fab4309dc
tree    7cbbead50556e2316b498b6923d2af25d0bf9b00
parent  88dc0700f699cb04b286590107717bad7e5ffeca
...
36
37
38
 
 
 
 
 
 
 
39
40
 
41
42
43
44
45
46
...
36
37
38
39
40
41
42
43
44
45
46
 
47
48
49
 
50
51
52
0
@@ -36,11 +36,17 @@ module Spec
0
         @mock.message(:unexpected_arg)
0
       end
0
     end
0
+
0
+    describe "#null_object?" do
0
+      it "should default to false" do
0
+        obj = mock('anything')
0
+        obj.should_not be_null_object
0
+      end
0
+    end
0
     
0
-    describe "as_null_object" do
0
+    describe "#as_null_object" do
0
       it "should set the object to null_object" do
0
         obj = mock('anything').as_null_object
0
-        
0
         obj.should be_null_object
0
       end
0
     end

Comments