Skip to content
Browse files

Fix preloadable assoc test, fix test for scrooge_installed? for assoc…

…iations
  • Loading branch information...
1 parent 1ca441a commit 89303283598fa45c3e53b789534a6e19d477af1c @sdsykes sdsykes committed
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/optimizations/associations/macro.rb
  2. +1 −1 test/optimizations/associations/macro_test.rb
View
2 lib/optimizations/associations/macro.rb
@@ -17,7 +17,7 @@ def install!
protected
def scrooge_installed?
- ActiveRecord::Base.included_modules.include?( InstanceMethods )
+ ActiveRecord::Associations::AssociationProxy.included_modules.include?( InstanceMethods )
end
end
View
2 test/optimizations/associations/macro_test.rb
@@ -17,7 +17,7 @@ class OptimizationsAssociationsMacroTest < ActiveSupport::TestCase
test "should only flag preloadable associations" do
Scrooge::Callsite.any_instance.expects(:association!).once
@user = MysqlUser.find(:first)
- @user.table_privileges
+ @user.host
assert_equal MysqlUser.scrooge_callsite( @user.callsite_signature ).associations, Set.new
end

0 comments on commit 8930328

Please sign in to comment.
Something went wrong with that request. Please try again.