aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-11-30 16:10:49 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-11-30 16:10:49 -0800
commit22b01c52c7cccdaa7f4fbed2a66c38a4c5416c6e (patch)
tree8447fd4dc1f4047e13e32060da496a21d7aa0b35
parentfe522f79c772c915efc88a8476fa69a503955967 (diff)
downloadrails-22b01c52c7cccdaa7f4fbed2a66c38a4c5416c6e.tar.gz
rails-22b01c52c7cccdaa7f4fbed2a66c38a4c5416c6e.tar.bz2
rails-22b01c52c7cccdaa7f4fbed2a66c38a4c5416c6e.zip
isolating eager_loading? method
-rw-r--r--activerecord/test/cases/relation_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation_test.rb b/activerecord/test/cases/relation_test.rb
index 3cc31b3db0..7bdbd773b6 100644
--- a/activerecord/test/cases/relation_test.rb
+++ b/activerecord/test/cases/relation_test.rb
@@ -124,5 +124,16 @@ module ActiveRecord
relation.create_with_value = {:hello => 'world'}
assert_equal({}, relation.scope_for_create)
end
+
+ def test_empty_eager_loading?
+ relation = Relation.new :a, :b
+ assert !relation.eager_loading?
+ end
+
+ def test_eager_load_values
+ relation = Relation.new :a, :b
+ relation.eager_load_values << :b
+ assert relation.eager_loading?
+ end
end
end