public
Fork of dchelimsky/rspec-tmbundle
Description: Textmate bundle for RSpec.
Clone URL: git://github.com/timcharper/rspec-tmbundle.git
dchelimsky (author)
Sun Mar 30 10:56:47 -0700 2008
commit  6111eeeb8ad02cf94d0652863abc4ad9c90d71e4
tree    26089de4c78948e3536d95565841bed2b39ad4c0
parent  d7b7a31c92457b1329b9feea32c4b7bbaa740585
...
75
76
77
78
 
79
80
81
...
83
84
85
 
 
 
 
 
 
 
 
 
 
86
87
88
...
400
401
402
 
403
404
405
...
75
76
77
 
78
79
80
81
...
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
...
410
411
412
413
414
415
416
0
@@ -75,7 +75,7 @@ module Spec
0
         @mock.rspec_verify
0
       end
0
       
0
- it "should raise exception if args dont match when method called" do
0
+ it "should raise exception if args don't match when method called" do
0
         @mock.should_receive(:something).with("a","b","c").and_return("booh")
0
         lambda {
0
           @mock.something("a","d","c")
0
@@ -83,6 +83,16 @@ module Spec
0
         }.should raise_error(MockExpectationError, "Mock 'test mock' expected :something with (\"a\", \"b\", \"c\") but received it with (\"a\", \"d\", \"c\")")
0
       end
0
            
0
+ it "should raise exception if args don't match when method called even when the method is stubbed" do
0
+ pending("need to do some refactoring before trying to get this to pass")
0
+ @mock.stub!(:something)
0
+ @mock.should_receive(:something).with("a","b","c")
0
+ lambda {
0
+ @mock.something("a","d","c")
0
+ violated
0
+ }.should raise_error(MockExpectationError, "Mock 'test mock' expected :something with (\"a\", \"b\", \"c\") but received it with (\"a\", \"d\", \"c\")")
0
+ end
0
+
0
       it "should fail if unexpected method called" do
0
         lambda {
0
           @mock.something("a","b","c")
0
@@ -400,6 +410,7 @@ module Spec
0
         mock = Mock.new('name', :message => :response)
0
         mock.message.should == :response
0
       end
0
+
0
     end
0
     
0
     describe "a mock message receiving a block" do

Comments

    No one has commented yet.