Skip to content
Browse files

Added spec.

  • Loading branch information...
1 parent 68c06b4 commit 076f4422b4e930909639993fb0cb48b602affcc3 Brian Takita committed Feb 15, 2010
Showing with 9 additions and 0 deletions.
  1. +9 −0 spec/api/stub/stub_spec.rb
View
9 spec/api/stub/stub_spec.rb
@@ -114,4 +114,13 @@ def method_missing(method_name, *args, &block)
instance.initialize_arguments.should == [1, 2]
block_called.should be_true
end
+
+ context "mock then stub" do
+ it "stubs any calls not matching the mock" do
+ mock(subject).foobar(3) {:baz3}
+ stub(subject).foobar {:baz}
+ subject.foobar(3).should == :baz3
+ subject.foobar(4).should == :baz
+ end
+ end
end

0 comments on commit 076f442

Please sign in to comment.
Something went wrong with that request. Please try again.