diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-07-21 11:37:03 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-21 17:17:23 +0200 |
commit | e107c208f0422b83df473666e30256f837c263eb (patch) | |
tree | ca6a09377a5e68b5c4b5ee62080c549d5c2af786 /railties/test/application | |
parent | 79d6f314c68a4d833a47d318b392808d530925c4 (diff) | |
download | rails-e107c208f0422b83df473666e30256f837c263eb.tar.gz rails-e107c208f0422b83df473666e30256f837c263eb.tar.bz2 rails-e107c208f0422b83df473666e30256f837c263eb.zip |
Make config.generators accept string namespaces, you can do now config.generators.test_framework 'rspec' for instance
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/generators_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb index cbf0decd07..d258625f42 100644 --- a/railties/test/application/generators_test.rb +++ b/railties/test/application/generators_test.rb @@ -103,5 +103,20 @@ module ApplicationTests assert_equal({ :plugin => { :generator => "-g" } }, c.generators.aliases) end end + + test "generators with string and hash for options should generate symbol keys" do + with_bare_config do |c| + c.generators do |g| + g.orm 'datamapper', :migration => false + end + + expected = { + :rails => { :orm => :datamapper }, + :datamapper => { :migration => false } + } + + assert_equal expected, c.generators.options + end + end end end |