aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorTyler Coville <tyler@tylercoville.com>2011-11-09 23:22:26 -0800
committerTyler Coville <tyler@tylercoville.com>2011-11-09 23:22:26 -0800
commit49349089ad38b403bf3f395ebf8fbc44cd232b49 (patch)
tree9330c1b1dbe469d7a66b1fd9644b64964ae260fd /railties/test/generators
parenta625523e755421b0f96fe5b0a885462ef51582b1 (diff)
downloadrails-49349089ad38b403bf3f395ebf8fbc44cd232b49.tar.gz
rails-49349089ad38b403bf3f395ebf8fbc44cd232b49.tar.bz2
rails-49349089ad38b403bf3f395ebf8fbc44cd232b49.zip
Fixed error with 'rails generate new plugin' where the .gitignore was not properly generated if --dummy-path was used and added test case
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/plugin_new_generator_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb
index 9183945619..b70f9f4d9c 100644
--- a/railties/test/generators/plugin_new_generator_test.rb
+++ b/railties/test/generators/plugin_new_generator_test.rb
@@ -236,6 +236,14 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
assert_file "spec/dummy/config/application.rb"
assert_no_file "test"
end
+
+ def test_ensure_that_gitignore_can_be_generated_from_a_template_for_dummy_path
+ FileUtils.cd(Rails.root)
+ run_generator([destination_root, "--dummy_path", "spec/dummy" "--skip-test-unit"])
+ assert_file ".gitignore" do |contents|
+ assert_match(/spec\/dummy/, contents)
+ end
+ end
def test_skipping_test_unit
run_generator [destination_root, "--skip-test-unit"]