mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #39671 from hahmed/railties/speed-up-test-skip-webpack-install
Speed up railties test test_skip_webpack_install currently ~10s
This commit is contained in:
commit
1f1e45630e
1 changed files with 6 additions and 2 deletions
|
@ -955,16 +955,20 @@ class AppGeneratorTest < Rails::Generators::TestCase
|
|||
end
|
||||
|
||||
generator([destination_root], skip_webpack_install: true).stub(:rails_command, command_check) do
|
||||
quietly { generator.invoke_all }
|
||||
generator.stub :bundle_command, nil do
|
||||
quietly { generator.invoke_all }
|
||||
end
|
||||
end
|
||||
|
||||
assert_gem "webpacker"
|
||||
assert_no_file "config/webpacker.yml"
|
||||
|
||||
output = Dir.chdir(destination_root) do
|
||||
`rails --help`
|
||||
`bin/rails help`
|
||||
end
|
||||
|
||||
assert_match(/The most common rails commands are:/, output)
|
||||
assert_match(/webpacker:install/, output)
|
||||
assert_equal true, $?.success?
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue