diff options
author | José Valim <jose.valim@gmail.com> | 2009-11-20 12:16:01 -0200 |
---|---|---|
committer | Yehuda Katz <wycats@Yehuda-Katz.local> | 2009-11-23 09:08:48 -0800 |
commit | d0aa0cfbd76a919e536e76d65419930fb7fe31da (patch) | |
tree | 2de342c2ae28fa4c406a56a51a2ed8f80c5b7e7f /railties/test/generators_test.rb | |
parent | d6f10126eb12e08ad670f803d237b942ebae5018 (diff) | |
download | rails-d0aa0cfbd76a919e536e76d65419930fb7fe31da.tar.gz rails-d0aa0cfbd76a919e536e76d65419930fb7fe31da.tar.bz2 rails-d0aa0cfbd76a919e536e76d65419930fb7fe31da.zip |
Ensure generator fallbacks work even when a context is given.
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
Diffstat (limited to 'railties/test/generators_test.rb')
-rw-r--r-- | railties/test/generators_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/test/generators_test.rb b/railties/test/generators_test.rb index a8716d9992..4b7b80c7f5 100644 --- a/railties/test/generators_test.rb +++ b/railties/test/generators_test.rb @@ -150,6 +150,13 @@ class GeneratorsTest < GeneratorsTestCase assert_equal "test_unit:generators:plugin", klass.namespace end + def test_fallbacks_for_generators_on_find_by_namespace_with_context + Rails::Generators.fallbacks[:remarkable] = :test_unit + klass = Rails::Generators.find_by_namespace(:remarkable, :rails, :plugin) + assert klass + assert_equal "test_unit:generators:plugin", klass.namespace + end + def test_fallbacks_for_generators_on_invoke Rails::Generators.fallbacks[:shoulda] = :test_unit TestUnit::Generators::ModelGenerator.expects(:start).with(["Account"], {}) |