diff options
author | Matthew Draper <matthew@trebex.net> | 2017-09-05 16:32:05 +0930 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-05 16:32:05 +0930 |
commit | c97346ecf257bf4c13c67953483705c09c9e0702 (patch) | |
tree | 6e089b8a6ccf52e4bd26ce810df3f3b15532cd5b /railties/test/secrets_test.rb | |
parent | 6b509dd18ca2a132342e9b850c00afc9b2a024b0 (diff) | |
parent | 802ce8a2392d3f749e665d4f9e54790cf613aaf9 (diff) | |
download | rails-c97346ecf257bf4c13c67953483705c09c9e0702.tar.gz rails-c97346ecf257bf4c13c67953483705c09c9e0702.tar.bz2 rails-c97346ecf257bf4c13c67953483705c09c9e0702.zip |
Merge pull request #30520 from rails/railties-rails-command
Run in-app rails commands via fork+load where possible
Diffstat (limited to 'railties/test/secrets_test.rb')
-rw-r--r-- | railties/test/secrets_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/test/secrets_test.rb b/railties/test/secrets_test.rb index ff6f955a78..631c6a13fe 100644 --- a/railties/test/secrets_test.rb +++ b/railties/test/secrets_test.rb @@ -108,7 +108,7 @@ class Rails::SecretsTest < ActiveSupport::TestCase config.dereferenced_secret = Rails.application.secrets.some_secret end_of_config - assert_equal "yeah yeah\n", `bin/rails runner -e production "puts Rails.application.config.dereferenced_secret"` + assert_equal "yeah yeah\n", rails("runner", "-e", "production", "puts Rails.application.config.dereferenced_secret", fork: false) end end @@ -141,7 +141,7 @@ class Rails::SecretsTest < ActiveSupport::TestCase assert_match(/production:\n\s*api_key: 00112233445566778899aabbccddeeff…\n/, File.read(tmp_path)) end - assert_equal "00112233445566778899aabbccddeeff…\n", `bin/rails runner -e production "puts Rails.application.secrets.api_key"` + assert_equal "00112233445566778899aabbccddeeff…\n", rails("runner", "-e", "production", "puts Rails.application.secrets.api_key", fork: false) end end @@ -158,7 +158,7 @@ class Rails::SecretsTest < ActiveSupport::TestCase assert_equal(secrets.dup.force_encoding(Encoding::ASCII_8BIT), IO.binread(tmp_path)) end - assert_equal "00112233445566778899aabbccddeeff…\n", `bin/rails runner -e production "puts Rails.application.secrets.api_key"` + assert_equal "00112233445566778899aabbccddeeff…\n", rails("runner", "-e", "production", "puts Rails.application.secrets.api_key", fork: false) end end |