1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use --skip-webpack-install by default

To remove extra `--no-skip-javascript` tests.
This commit is contained in:
yuuji.yaginuma 2018-10-09 09:30:45 +09:00
parent 7c846d9c73
commit 9195cdb7cd
3 changed files with 7 additions and 7 deletions

View file

@ -68,7 +68,7 @@ module Rails
capture(:stdout) do
args += ["--skip-bundle"] unless args.include? "--dev"
args |= ["--skip-bootsnap"] unless args.include? "--no-skip-bootsnap"
args |= ["--skip-javascript"] unless args.include? "--no-skip-javascript"
args |= ["--skip-webpack-install"] unless args.include? "--no-skip-webpack-install"
generator_class.start(args, config.reverse_merge(destination_root: destination_root))
end

View file

@ -113,7 +113,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
def test_assets
run_generator [destination_root, "--no-skip-javascript", "--skip-webpack-install"]
run_generator
assert_file("app/views/layouts/application.html.erb", /stylesheet_link_tag\s+'application', media: 'all', 'data-turbolinks-track': 'reload'/)
assert_file("app/views/layouts/application.html.erb", /javascript_pack_tag\s+'application', 'data-turbolinks-track': 'reload'/)
@ -840,7 +840,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
def test_generator_if_skip_turbolinks_is_given
run_generator [destination_root, "--skip-turbolinks", "--no-skip-javascript", "--skip-webpack-install"]
run_generator [destination_root, "--skip-turbolinks"]
assert_no_gem "turbolinks"
assert_file "app/views/layouts/application.html.erb" do |content|

View file

@ -27,7 +27,7 @@ module SharedGeneratorTests
end
def test_skeleton_is_created
run_generator [destination_root, "--no-skip-javascript", "--skip-webpack-install"]
run_generator
default_files.each { |path| assert_file path }
end
@ -196,7 +196,7 @@ module SharedGeneratorTests
end
def test_generator_for_active_storage
run_generator [destination_root, "--no-skip-javascript", "--skip-webpack-install"]
run_generator
unless generator_class.name == "Rails::Generators::PluginGenerator"
assert_file "#{application_path}/app/javascript/packs/application.js" do |content|
@ -226,7 +226,7 @@ module SharedGeneratorTests
end
def test_generator_if_skip_active_storage_is_given
run_generator [destination_root, "--skip-active-storage", "--no-skip-javascript", "--skip-webpack-install"]
run_generator [destination_root, "--skip-active-storage"]
assert_file "#{application_path}/config/application.rb", /#\s+require\s+["']active_storage\/engine["']/
@ -256,7 +256,7 @@ module SharedGeneratorTests
end
def test_generator_does_not_generate_active_storage_contents_if_skip_active_record_is_given
run_generator [destination_root, "--skip-active-record", "--no-skip-javascript", "--skip-webpack-install"]
run_generator [destination_root, "--skip-active-record"]
assert_file "#{application_path}/config/application.rb", /#\s+require\s+["']active_storage\/engine["']/