mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
skip testing framework if app created with --skip-test-unit [#5796 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
@@ -48,6 +48,10 @@ module <%= app_const_base %>
|
||||
# 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 @@ class AppGeneratorTest < Rails::Generators::TestCase
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user