1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00

Tests targeting Rails < 4.1 rather than ~> 4.0.0

This commit is contained in:
Whitney Young 2013-10-25 15:01:36 -03:00
parent bcb39fa03d
commit 06fec65983

View file

@ -38,8 +38,8 @@ if defined? ActiveRecord
end
context "when total_count receives options" do
it "should return a distinct total count for rails ~> 4.0.0" do
if ActiveRecord::VERSION::STRING > "4.0.0" && ActiveRecord::VERSION::STRING < "4.1.0"
it "should return a distinct total count for rails < 4.1" do
if ActiveRecord::VERSION::STRING < "4.1.0"
User.page(1).total_count(:name, :distinct => true).should == 4
end
end
@ -52,8 +52,8 @@ if defined? ActiveRecord
end
context "when count receives options" do
it "should return a distinct set by column for rails ~> 4.0.0" do
if ActiveRecord::VERSION::STRING > "4.0.0" && ActiveRecord::VERSION::STRING < "4.1.0"
it "should return a distinct set by column for rails < 4.1" do
if ActiveRecord::VERSION::STRING < "4.1.0"
User.page(1).count(:name, :distinct => true).should == 4
end
end