mirego/partisan — pull request #10 by remiprev (2013-08-09 13:17:06+00:00)
Title: Make tests pass with ActiveRecord 3

ActiveRecord 4 changes the way relations are instantiated. With ActiveRecord 3, every relation is an instance of `ActiveRecord::Relation` but now it depends on the class of the records it’s holding, eg. `ActiveRecord::Relation::ActiveRecord_Relation_User`.

We need the test suite to pass on both ActiveRecord 3 and 4, so I created a little helper to figure out which class to use in tests.