diff options
author | José Valim <jose.valim@gmail.com> | 2010-06-29 19:47:04 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-29 19:50:09 +0200 |
commit | 67582f08bf86ec71a27363554bc550e929a007f7 (patch) | |
tree | 08d32373ddb44f7033779ca0b60ccefed3f3cfb0 /activerecord/test | |
parent | 7ea85ff516df142b60126e2dcc1174fd0b8f85a9 (diff) | |
download | rails-67582f08bf86ec71a27363554bc550e929a007f7.tar.gz rails-67582f08bf86ec71a27363554bc550e929a007f7.tar.bz2 rails-67582f08bf86ec71a27363554bc550e929a007f7.zip |
Push a failing test for issues [#4994] and [#5003].
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/named_scope_test.rb | 6 | ||||
-rw-r--r-- | activerecord/test/models/without_table.rb | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/cases/named_scope_test.rb b/activerecord/test/cases/named_scope_test.rb index 6574e4cfc0..dc85b395d3 100644 --- a/activerecord/test/cases/named_scope_test.rb +++ b/activerecord/test/cases/named_scope_test.rb @@ -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 diff --git a/activerecord/test/models/without_table.rb b/activerecord/test/models/without_table.rb new file mode 100644 index 0000000000..87f80911e1 --- /dev/null +++ b/activerecord/test/models/without_table.rb @@ -0,0 +1,3 @@ +class WithoutTable < ActiveRecord::Base + default_scope where(:published => true) +end
\ No newline at end of file |