Skip to content

Commit ece635b

Browse files
committed
Split bin/rails test test:system into two steps:
- `bin/rails test test:system` is not a thing. The `test:system` part is silently discarded. This should be loudly failing with the change I'm trying to add in rails#54741, and there are discussions in rails#54736 whether running multiple commands à la rake should be supported. But in the meantime, modifying this into two steps would ensure your system tests actually run.
1 parent f575fca commit ece635b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

railties/lib/rails/generators/rails/app/templates/config/ci.rb.tt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ CI.run do
1919
<% if options[:api] || options[:skip_system_test] -%>
2020
step "Tests: Rails", "bin/rails test"
2121
<% else %>
22-
step "Tests: Rails", "bin/rails test test:system"
22+
step "Tests: Rails", "bin/rails test"
23+
step "Tests: System", "bin/rails test:system"
2324
<% end -%>
2425
step "Tests: Seeds", "env RAILS_ENV=test bin/rails db:seed:replant"
2526

railties/test/application/bin_ci_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ class BinCiTest < ActiveSupport::TestCase
1919
# Default steps
2020
assert_match(/bin\/rubocop/, content)
2121
assert_match(/bin\/brakeman/, content)
22-
assert_match(/bin\/rails test/, content)
22+
assert_match(/"bin\/rails test"$/, content)
23+
assert_match(/"bin\/rails test:system"$/, content)
2324
assert_match(/bin\/rails db:seed:replant/, content)
2425

2526
# Node-specific steps excluded by default

0 commit comments

Comments
 (0)