From b9ad9bc5a6c1cbc9c54dc00ee874bf0be5b51008 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Sun, 10 Nov 2013 03:31:50 +0900 Subject: [PATCH] Skip the whole test when the version doesn't match from @eitoball's comment: https://github.com/amatsuda/kaminari/pull/449#issuecomment-26684361 --- .../active_record/active_record_relation_methods_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/models/active_record/active_record_relation_methods_spec.rb b/spec/models/active_record/active_record_relation_methods_spec.rb index fa45fcc..b53faea 100644 --- a/spec/models/active_record/active_record_relation_methods_spec.rb +++ b/spec/models/active_record/active_record_relation_methods_spec.rb @@ -51,9 +51,9 @@ if defined? ActiveRecord end end - context "when count receives options" do - it "should return a distinct set by column for rails < 4.1" do - if ActiveRecord::VERSION::STRING < "4.1.0" + if ActiveRecord::VERSION::STRING < '4.1.0' + context 'when count receives options' do + it 'should return a distinct set by column for rails < 4.1' do User.page(1).count(:name, :distinct => true).should == 4 end end