Browse files

I prefer formatting specs with blank lines between each example.

  • Loading branch information...
1 parent 06f6bcb commit b08bf1715b471853d22f01e4973c47f1d26ac4b7 @myronmarston myronmarston committed Mar 23, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 spec/rspec/mocks/mock_space_spec.rb
View
5 spec/rspec/mocks/mock_space_spec.rb
@@ -23,29 +23,34 @@ def reset?
@m1 = klazz.new
@m2 = klazz.new
end
+
it "verifies all mocks within" do
@space.add(@m1)
@space.add(@m2)
@space.verify_all
expect(@m1).to be_verified
expect(@m2).to be_verified
end
+
it "resets all mocks within" do
@space.add(m1 = double("mock1"))
@space.add(m2 = double("mock2"))
m1.should_receive(:rspec_reset)
m2.should_receive(:rspec_reset)
@space.reset_all
end
+
it "clears internal mocks on reset_all" do
@space.add(double("mock"))
@space.reset_all
expect(@space.instance_eval { receivers.empty? }).to be_true
end
+
it "resets the ordering" do
@space.reset_all
expect(@space.expectation_ordering).to be_empty
end
+
it "only adds an instance once" do
@space.add(m1 = double("mock1"))
@space.add(m1)

0 comments on commit b08bf17

Please sign in to comment.