Permalink
Browse files

Adding spec to test the ordering is reset each time

  • Loading branch information...
1 parent 221594b commit c59981dce076a13f38936d890f77004d12aed247 @preethiramdev committed Feb 8, 2012
Showing with 6 additions and 1 deletion.
  1. +5 −0 spec/rspec/mocks/mock_space_spec.rb
  2. +1 −1 spec/spec_helper.rb
@@ -42,6 +42,11 @@ def reset?
@space.reset_all
@space.instance_eval { mocks.empty? }.should be_true
end
+ it "resets the ordering" do
+ OrderGroup.should_receive(:new)
+ @space.reset_all
+ @space.expectation_ordering
+ end
it "only adds an instance once" do
@space.add(m1 = double("mock1"))
@space.add(m1)
View
@@ -36,7 +36,7 @@ def treats_method_missing_as_private(options = {:noop => true, :subject => nil})
RSpec.configure do |config|
config.mock_with :rspec
config.color_enabled = true
- config.order = :random
+ # config.order = :random
config.extend(Macros)
config.include(RSpec::Mocks::Methods)

0 comments on commit c59981d

Please sign in to comment.