Skip to content

Commit

Permalink
no need for begin/rescue in this example
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Apr 2, 2011
1 parent 5deee72 commit 646ff61
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions spec/rspec/mocks/any_instance_spec.rb
Expand Up @@ -57,10 +57,7 @@ def another_existing_method; 4; end
context "with #and_return" do
it "stubs a method that doesn't exist" do
klass.any_instance.stub(:foo).and_return(1)
begin
klass.new.foo.should eq(1)
rescue Exception => e
end
klass.new.foo.should eq(1)
end

it "stubs a method that exists" do
Expand Down

0 comments on commit 646ff61

Please sign in to comment.