Permalink
Browse files

Cleanup spec a bit.

  • Loading branch information...
1 parent 1272c8a commit 306ee361ca16eb705336472c763a8b2bbee66211 @myronmarston myronmarston committed Aug 3, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 spec/rspec/mocks/any_instance_spec.rb
@@ -827,15 +827,15 @@ class RSpec::SampleRspecTestClass;end
end
end
- context "when used with base class" do
+ context "when directed at a method defined on a superclass" do
let(:sub_klass) { Class.new(klass) }
-
- it "should stub method in base class" do
+
+ it "stubs the method correctly" do
klass.any_instance.stub(:existing_method).and_return("foo")
sub_klass.new.existing_method.should == "foo"
end
-
- it "fails if the method is invoked on a second instance" do
+
+ it "mocks the method correctly" do
instance_one = sub_klass.new
instance_two = sub_klass.new
expect do

0 comments on commit 306ee36

Please sign in to comment.