diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2009-11-24 21:45:14 +1100 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2009-11-24 21:45:14 +1100 |
commit | 5f2395041d1578433fa825ed5c6f26a201f2203d (patch) | |
tree | 3b78531ae77a2173ad0df1103543bdfea0b1f60f /railties/test/generators_test.rb | |
parent | 3a72923e27195983d37bdb39ef26b29cf03d3483 (diff) | |
parent | e62e6d409986cd5c99234689aa49e3162d7b3a59 (diff) | |
download | rails-5f2395041d1578433fa825ed5c6f26a201f2203d.tar.gz rails-5f2395041d1578433fa825ed5c6f26a201f2203d.tar.bz2 rails-5f2395041d1578433fa825ed5c6f26a201f2203d.zip |
Merge branch 'master' of git://github.com/rails/rails into rails_master
Diffstat (limited to 'railties/test/generators_test.rb')
-rw-r--r-- | railties/test/generators_test.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/railties/test/generators_test.rb b/railties/test/generators_test.rb index 9c9a4e6016..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"], {}) @@ -166,10 +173,7 @@ class GeneratorsTest < GeneratorsTestCase Rails::Generators.options[:new_generator] = { :generate => false } klass = Class.new(Rails::Generators::Base) do - def self.name - "NewGenerator" - end - + def self.name() 'NewGenerator' end class_option :generate, :default => true end |