Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

#all is the preferred way to get a relation in Rails 4

  • Loading branch information...
commit 5fa75f900cb119327be901d851f6252e4b7267db 1 parent 2325288
@alindeman alindeman authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 features/matchers/relation_match_array.feature
View
7 features/matchers/relation_match_array.feature
@@ -11,7 +11,12 @@ Feature: ActiveRecord::Relation match array
describe Widget do
let!(:widgets) { Array.new(3) { Widget.create } }
- subject { Widget.scoped }
+
+ if ::Rails::VERSION::STRING >= '4'
+ subject { Widget.all }
+ else
+ subject { Widget.scoped }
+ end
it "returns all widgets in any order" do
expect(subject).to match_array(widgets)
Please sign in to comment.
Something went wrong with that request. Please try again.