diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-10-27 00:16:57 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-11-02 17:14:51 +0100 |
commit | 46fdb3197d270551da260cfed3dea7928dd15b0f (patch) | |
tree | b28a25adc2a6577bcceed87f81c5be602da5d41a /railties/test | |
parent | 671d1469c6f70abb7cbd373bb37f18268ed7069c (diff) | |
download | rails-46fdb3197d270551da260cfed3dea7928dd15b0f.tar.gz rails-46fdb3197d270551da260cfed3dea7928dd15b0f.tar.bz2 rails-46fdb3197d270551da260cfed3dea7928dd15b0f.zip |
Pass more options to test/dummy in 'plugin new' generator
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/plugin_new_generator_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index f833411e3a..53e1dd6708 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -63,6 +63,21 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase assert_no_file "test/dummy/config/database.yml" end + def test_ensure_that_database_option_is_passed_to_app_generator + run_generator [destination_root, "--database", "postgresql"] + assert_file "test/dummy/config/database.yml", /postgres/ + end + + def test_ensure_that_javascript_option_is_passed_to_app_generator + run_generator [destination_root, "--javascript", "jquery"] + assert_file "test/dummy/public/javascripts/jquery.js" + end + + def test_ensure_that_skip_javascript_option_is_passed_to_app_generator + run_generator [destination_root, "--skip_javascript"] + assert_no_file "test/dummy/public/javascripts/prototype.js" + end + def test_template_from_dir_pwd FileUtils.cd(Rails.root) assert_match /It works from file!/, run_generator([destination_root, "-m", "lib/template.rb"]) |