diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/commands/console_test.rb | 5 | ||||
-rw-r--r-- | railties/test/commands/dbconsole_test.rb | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/railties/test/commands/console_test.rb b/railties/test/commands/console_test.rb index 08c560146c..a7169e16fb 100644 --- a/railties/test/commands/console_test.rb +++ b/railties/test/commands/console_test.rb @@ -82,6 +82,11 @@ class Rails::ConsoleTest < ActiveSupport::TestCase assert_match(/\sspecial-production\s/, output) end + def test_e_option_is_properly_expanded + start ["-e", "prod"] + assert_match(/\sproduction\s/, output) + end + def test_environment_option start ["--environment=special-production"] assert_match(/\sspecial-production\s/, output) diff --git a/railties/test/commands/dbconsole_test.rb b/railties/test/commands/dbconsole_test.rb index e6a67c2c49..4f55eb9aa6 100644 --- a/railties/test/commands/dbconsole_test.rb +++ b/railties/test/commands/dbconsole_test.rb @@ -105,6 +105,12 @@ class Rails::DBConsoleTest < ActiveSupport::TestCase end end + def test_rails_env_is_development_when_environment_option_is_dev + stub_available_environments([ "development", "test" ]) do + assert_match("development", parse_arguments([ "-e", "dev" ])[:environment]) + end + end + def test_rails_env_is_dev_when_argument_is_dev_and_dev_env_is_present assert_deprecated do stub_available_environments([ "dev" ]) do |