Browse files

Compile packs before run test

Sometimes `test_scaffold_tests_pass_by_default` test fails in CI.
It seems `manifest.json` was broken.

`webpacker` will compile automatically if packs is not compiled.
If parallel test is enabled, it seems that this compilation process is
executed simultaneously in multiple processes, and it may become an
inconsistent state.
In order to avoid this, compile before running the test.
  • Loading branch information...
y-yagi committed Nov 22, 2018
1 parent f8bd01c commit 6d854f9d077b34b846de7a2f998423a6aa66b1e4
Showing with 4 additions and 1 deletion.
  1. +4 −1 railties/test/application/rake_test.rb
@@ -160,7 +160,10 @@ def test_loading_only_yml_fixtures
def test_scaffold_tests_pass_by_default
rails "generate", "scaffold", "user", "username:string", "password:string"
with_rails_env("test") { rails("db:migrate") }
with_rails_env("test") do
output = rails("test")
assert_match(/7 runs, 9 assertions, 0 failures, 0 errors/, output)

0 comments on commit 6d854f9

Please sign in to comment.