aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
diff options
context:
space:
mode:
authorYuji Yaginuma <yuuji.yaginuma@gmail.com>2019-03-15 08:24:19 +0900
committerGitHub <noreply@github.com>2019-03-15 08:24:19 +0900
commit1cdc6c6576afe9a9fa67a6b313080a7dc62188d9 (patch)
treea09d66331fc1739ee7a65b66c545c98720b06503 /railties/test/application
parent85984e50311b7138504abe1be9bbe99f96dde8ef (diff)
parentc801b232bcb5d885e846e33e26becd33631b8c5b (diff)
downloadrails-1cdc6c6576afe9a9fa67a6b313080a7dc62188d9.tar.gz
rails-1cdc6c6576afe9a9fa67a6b313080a7dc62188d9.tar.bz2
rails-1cdc6c6576afe9a9fa67a6b313080a7dc62188d9.zip
Merge pull request #35599 from y-yagi/improve_environment_argument_handling
Properly expand the environment's name in all commands
Diffstat (limited to 'railties/test/application')
-rw-r--r--railties/test/application/runner_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/railties/test/application/runner_test.rb b/railties/test/application/runner_test.rb
index d590b6f6fb..dfb9540093 100644
--- a/railties/test/application/runner_test.rb
+++ b/railties/test/application/runner_test.rb
@@ -109,6 +109,10 @@ module ApplicationTests
assert_match "production", rails("runner", "-e", "production", "puts Rails.env")
end
+ def test_environment_option_is_properly_expanded
+ assert_match "production", rails("runner", "-e", "prod", "puts Rails.env")
+ end
+
def test_runner_detects_syntax_errors
output = rails("runner", "puts 'hello world", allow_failure: true)
assert_not_predicate $?, :success?