aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/app_generator_test.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index decea77d48..68b31148d6 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -746,11 +746,13 @@ class AppGeneratorTest < Rails::Generators::TestCase
def test_webpack_option
command_check = -> command, *_ do
@called ||= 0
- @called += 1 if command == "webpacker:install"
- assert_equal 1, @called, "webpacker:install expected to be called once, but was called #{@called} times."
+ if command == "webpacker:install"
+ @called += 1
+ assert_equal 1, @called, "webpacker:install expected to be called once, but was called #{@called} times."
+ end
end
- generator([destination_root], webpack: true).stub(:rails_command, command_check) do
+ generator([destination_root], webpack: "webpack").stub(:rails_command, command_check) do
quietly { generator.invoke_all }
end