Permalink
Browse files

Fix order-dependent spec

  • Loading branch information...
1 parent b6022dc commit 0b9b1531c17fca0141152ccd93697f57e1c6891f @justinko justinko committed Oct 25, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 spec/rspec/rails/matchers/relation_match_array_spec.rb
View
3 spec/rspec/rails/matchers/relation_match_array_spec.rb
@@ -1,6 +1,8 @@
require "spec_helper"
describe "ActiveSupport::Relation =~ matcher" do
+ before { MockableModel.delete_all }
+
let!(:models) { Array.new(3) { MockableModel.create } }
it "verifies that the scope returns the records on the right hand side, regardless of order" do
@@ -9,7 +11,6 @@
it "fails if the scope encompasses more records than on the right hand side" do
another_model = MockableModel.create
-
MockableModel.scoped.should_not =~ models.reverse
end

0 comments on commit 0b9b153

Please sign in to comment.