Permalink
Browse files

skip testing framework if app created with --skip-test-unit [#5796 st…

…ate:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 37d3266 commit bafa1533f414a3d3c02528b774e5cf28e85774b5 @robzolkos robzolkos committed with josevalim Oct 19, 2010
@@ -48,6 +48,10 @@ class Application < Rails::Application
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
<% end -%>
+<% if options[:skip_test_unit] -%>
+ config.generators.test_framework = false
+<% end -%>
+
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
@@ -188,6 +188,13 @@ def test_prototype_and_test_unit_are_added_by_default
assert_file "test"
end
+ def test_test_unit_is_removed_from_frameworks_if_skip_test_unit_is_given
+ run_generator [destination_root, "--skip-test-unit"]
+ assert_file "config/application.rb" do |file|
+ assert_match /config.generators.test_framework = false/, file
+ end
+ end
+
def test_test_unit_is_skipped_if_required
run_generator [destination_root, "--skip-test-unit"]
assert_no_file "test"

0 comments on commit bafa153

Please sign in to comment.