diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/commands/secrets_test.rb | 7 | ||||
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 8 |
2 files changed, 3 insertions, 12 deletions
diff --git a/railties/test/commands/secrets_test.rb b/railties/test/commands/secrets_test.rb index 00b0343397..fb8fd2325e 100644 --- a/railties/test/commands/secrets_test.rb +++ b/railties/test/commands/secrets_test.rb @@ -18,7 +18,8 @@ class Rails::Command::SecretsCommandTest < ActiveSupport::TestCase end test "edit secrets" do - run_setup_command + # Runs setup before first edit. + assert_match(/Adding config\/secrets\.yml\.key to store the encryption key/, run_edit_command) # Run twice to ensure encrypted secrets can be reread after first edit pass. 2.times do @@ -30,8 +31,4 @@ class Rails::Command::SecretsCommandTest < ActiveSupport::TestCase def run_edit_command(editor: "cat") Dir.chdir(app_path) { `EDITOR="#{editor}" bin/rails secrets:edit` } end - - def run_setup_command - Dir.chdir(app_path) { `bin/rails secrets:setup` } - end end diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index ff829eb197..31a5efb1b7 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -412,13 +412,6 @@ class AppGeneratorTest < Rails::Generators::TestCase end end - def test_generator_if_skip_yarn_is_given - run_generator [destination_root, "--skip-yarn"] - - assert_no_file "package.json" - assert_no_file "bin/yarn" - end - def test_generator_if_skip_action_cable_is_given run_generator [destination_root, "--skip-action-cable"] assert_file "config/application.rb", /#\s+require\s+["']action_cable\/engine["']/ @@ -524,6 +517,7 @@ class AppGeneratorTest < Rails::Generators::TestCase def test_generator_for_yarn_skipped run_generator([destination_root, "--skip-yarn"]) assert_no_file "package.json" + assert_no_file "bin/yarn" assert_file "config/initializers/assets.rb" do |content| assert_no_match(/node_modules/, content) |