1
0
Fork 0
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:
Eugene Kenny 2020-06-29 23:56:21 +01:00 committed by GitHub
commit 1f1e45630e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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