From c801b232bcb5d885e846e33e26becd33631b8c5b Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Mon, 4 Mar 2019 08:12:05 +0900 Subject: Properly expand the environment's name in all commands Since 3777701f1380f3814bd5313b225586dec64d4104, the environment's name is automatically expanded in console and dbconsole commands. In order to match the behavior between the commands, fixes it to have the same behavior of all the commands. This behavior is defined in `EnvironmentArgument`. Since `EnvironmentArgument` also defines the environment option, it is reused. However, since desc was not content that can be used in all comments, fixed desc to be defined for each command. --- railties/test/application/runner_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'railties/test/application') 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? -- cgit v1.2.3