Skip to content

Commit

Permalink
Merge pull request rails#39671 from hahmed/railties/speed-up-test-ski…
Browse files Browse the repository at this point in the history
…p-webpack-install

Speed up railties test test_skip_webpack_install currently ~10s
  • Loading branch information
eugeneius authored Jun 29, 2020
2 parents 60ef070 + 46045e3 commit 1f1e456
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions railties/test/generators/app_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -955,16 +955,20 @@ def test_skip_webpack_install
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

Expand Down

0 comments on commit 1f1e456

Please sign in to comment.