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