diff options
author | Yves Senn <yves.senn@gmail.com> | 2012-11-07 20:54:49 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@garaio.com> | 2012-11-08 13:08:19 +0100 |
commit | 1785bf7d6727c8c9d847eaa741ad41a9b750cd28 (patch) | |
tree | 090f95aca392a9efcd4bc1038713a3e5c3af65a9 /railties/test | |
parent | c1488232e75ff61dd4babfa20842c5c0746da0f9 (diff) | |
download | rails-1785bf7d6727c8c9d847eaa741ad41a9b750cd28.tar.gz rails-1785bf7d6727c8c9d847eaa741ad41a9b750cd28.tar.bz2 rails-1785bf7d6727c8c9d847eaa741ad41a9b750cd28.zip |
`plugin new` adds dummy app tasks when necessary.
Closes #8121
The `plugin new` generator always adds the dummy app rake tasks,
when a dummy app was created.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/plugin_new_generator_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index 6974db5751..ab78800a4e 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -66,6 +66,12 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase assert_no_match(/APP_RAKEFILE/, File.read(File.join(destination_root, "Rakefile"))) end + def test_generating_adds_dummy_app_rake_tasks_without_unit_test_files + run_generator [destination_root, "-T", "--mountable", '--dummy-path', 'my_dummy_app'] + + assert_match(/APP_RAKEFILE/, File.read(File.join(destination_root, "Rakefile"))) + end + def test_ensure_that_plugin_options_are_not_passed_to_app_generator FileUtils.cd(Rails.root) assert_no_match(/It works from file!.*It works_from_file/, run_generator([destination_root, "-m", "lib/template.rb"])) |