diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-10-22 05:22:04 -0700 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-10-22 05:22:04 -0700 |
commit | ebeb87eca8424bad214a50b7fb9b2704f102d34d (patch) | |
tree | 941a7fc64fc84da3442b66338805829c16f6d16d /railties/test/generators | |
parent | 99044beb8163d42d6f0bcf26c7215e209e7f2bc7 (diff) | |
parent | 52b252614e275da799b6a15cebbfd067c59987d1 (diff) | |
download | rails-ebeb87eca8424bad214a50b7fb9b2704f102d34d.tar.gz rails-ebeb87eca8424bad214a50b7fb9b2704f102d34d.tar.bz2 rails-ebeb87eca8424bad214a50b7fb9b2704f102d34d.zip |
Merge pull request #12606 from robin850/apps-with-spaces
Make the application name snake cased when it contains spaces
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 2f0dfc7d3e..24f01c878c 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -367,6 +367,16 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_no_match(/run bundle install/, output) end + def test_application_name_with_spaces + path = File.join(destination_root, "foo bar".shellescape) + + # This also applies to MySQL apps but not with SQLite + run_generator [path, "-d", 'postgresql'] + + assert_file "foo bar/config/database.yml", /database: foo_bar_development/ + assert_file "foo bar/config/initializers/session_store.rb", /key: '_foo_bar/ + end + protected def action(*args, &block) |