From 8e6aea32d44019fa85000e3929a012eb3489ed5d Mon Sep 17 00:00:00 2001 From: Joel Turkel Date: Sun, 19 Apr 2015 16:25:20 -0400 Subject: [PATCH] Fix Rails 4.0 tests --- spec/goldiloader/goldiloader_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/goldiloader/goldiloader_spec.rb b/spec/goldiloader/goldiloader_spec.rb index b7df2d7..9f12d56 100644 --- a/spec/goldiloader/goldiloader_spec.rb +++ b/spec/goldiloader/goldiloader_spec.rb @@ -383,7 +383,7 @@ expect(blogs.first.posts_ordered_by_author.map(&:author).map(&:name)).to eq sorted_post_authors end - if ActiveRecord.gem_version >= Gem::Version.new('4.2') + if Goldiloader::Compatibility.joins_eager_loadable? it_behaves_like "it auto eager loads the association", :posts_ordered_by_author else it_behaves_like "it doesn't auto eager the association", :posts_ordered_by_author @@ -400,7 +400,7 @@ expect(blogs.first.posts_ordered_by_author.map(&:author).map(&:address).map(&:city)).to eq sorted_post_cities end - if ActiveRecord.gem_version >= Gem::Version.new('4.2') + if Goldiloader::Compatibility.joins_eager_loadable? it_behaves_like "it auto eager loads the association", :authors_with_join else it_behaves_like "it doesn't auto eager the association", :authors_with_join