Permalink
Browse files

Merge pull request #1262 from dmathieu/dummy_without_tests

Create the dummy app if there's no test_unit but there's a dummy_path
  • Loading branch information...
2 parents b8118ef + 3d9d9f8 commit cedadad8911a0201891eeb9efc7682d2f2468c3b @josevalim josevalim committed May 24, 2011
View
2 railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb
@@ -202,7 +202,7 @@ def create_test_files
end
def create_test_dummy_files
- return if options[:skip_test_unit]
+ return if options[:skip_test_unit] && options[:dummy_path] == 'test/dummy'
create_dummy_app
end
View
7 railties/test/generators/plugin_new_generator_test.rb
@@ -182,6 +182,13 @@ def test_passing_dummy_path_as_a_parameter
assert_file "spec/dummy/config/application.rb"
assert_no_file "test/dummy"
end
+
+ def test_creating_dummy_without_tests_but_with_dummy_path
+ run_generator [destination_root, "--dummy_path", "spec/dummy", "--skip-test-unit"]
+ assert_file "spec/dummy"
+ assert_file "spec/dummy/config/application.rb"
+ assert_no_file "test"
+ end
def test_skipping_gemspec
run_generator [destination_root, "--skip-gemspec"]

0 comments on commit cedadad

Please sign in to comment.