aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/named_scope_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/named_scope_test.rb b/activerecord/test/cases/named_scope_test.rb
index 7c037b20c5..c42dda2ccb 100644
--- a/activerecord/test/cases/named_scope_test.rb
+++ b/activerecord/test/cases/named_scope_test.rb
@@ -478,4 +478,10 @@ class DynamicScopeTest < ActiveRecord::TestCase
assert_equal Post.scoped_by_author_id(1).find(1), Post.find(1)
assert_equal Post.scoped_by_author_id_and_title(1, "Welcome to the weblog").first, Post.find(:first, :conditions => { :author_id => 1, :title => "Welcome to the weblog"})
end
+
+ def test_dynamic_scope_should_create_methods_after_hitting_method_missing
+ assert Developer.methods.grep(/scoped_by_created_at/).blank?
+ Developer.scoped_by_created_at(nil)
+ assert Developer.methods.grep(/scoped_by_created_at/).present?
+ end
end