Skip to content

Commit

Permalink
Tests targeting Rails < 4.1 rather than ~> 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wbyoung committed Nov 5, 2013
1 parent bcb39fa commit 06fec65
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
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
Expand All @@ -52,8 +52,8 @@
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
Expand Down

0 comments on commit 06fec65

Please sign in to comment.