aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/named_scope_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/named_scope_test.rb')
-rw-r--r--activerecord/test/cases/named_scope_test.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/activerecord/test/cases/named_scope_test.rb b/activerecord/test/cases/named_scope_test.rb
index 33ffb041c1..dc85b395d3 100644
--- a/activerecord/test/cases/named_scope_test.rb
+++ b/activerecord/test/cases/named_scope_test.rb
@@ -54,8 +54,8 @@ class NamedScopeTest < ActiveRecord::TestCase
end
def test_respond_to_respects_include_private_parameter
- assert !Topic.approved.respond_to?(:with_create_scope)
- assert Topic.approved.respond_to?(:with_create_scope, true)
+ assert !Topic.approved.respond_to?(:tables_in_string)
+ assert Topic.approved.respond_to?(:tables_in_string, true)
end
def test_subclasses_inherit_scopes
@@ -450,6 +450,12 @@ class NamedScopeTest < ActiveRecord::TestCase
assert before.object_id != post.comments.containing_the_letter_e.object_id, "AssociationCollection##{method} should reset the named scopes cache"
end
end
+
+ def test_named_scoped_are_lazy_loaded_if_table_still_does_not_exist
+ assert_nothing_raised do
+ require "models/without_table"
+ end
+ end
end
class DynamicScopeMatchTest < ActiveRecord::TestCase