diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2019-01-16 20:47:39 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2019-01-17 16:08:34 -0500 |
commit | e20589c9be09c7272d73492d4b0f7b24e5595571 (patch) | |
tree | a7636109e381c7b09a6e29c156e8eed85b8d579e /railties/test/commands/console_test.rb | |
parent | 9d39f81d512e0d16a27e2e864ea2dd0e8dc41b17 (diff) | |
download | rails-e20589c9be09c7272d73492d4b0f7b24e5595571.tar.gz rails-e20589c9be09c7272d73492d4b0f7b24e5595571.tar.bz2 rails-e20589c9be09c7272d73492d4b0f7b24e5595571.zip |
Remove deprecated `environment` argument from the rails commands
Diffstat (limited to 'railties/test/commands/console_test.rb')
-rw-r--r-- | railties/test/commands/console_test.rb | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/railties/test/commands/console_test.rb b/railties/test/commands/console_test.rb index 0b2fe204f8..1941c83d6d 100644 --- a/railties/test/commands/console_test.rb +++ b/railties/test/commands/console_test.rb @@ -94,28 +94,7 @@ class Rails::ConsoleTest < ActiveSupport::TestCase assert_match(/\sspecial-production\s/, output) end - def test_rails_env_is_production_when_first_argument_is_p - assert_deprecated do - start ["p"] - assert_match(/\sproduction\s/, output) - end - end - - def test_rails_env_is_test_when_first_argument_is_t - assert_deprecated do - start ["t"] - assert_match(/\stest\s/, output) - end - end - - def test_rails_env_is_development_when_argument_is_d - assert_deprecated do - start ["d"] - assert_match(/\sdevelopment\s/, output) - end - end - - def test_rails_env_is_dev_when_argument_is_dev_and_dev_env_is_present + def test_rails_env_is_dev_when_environment_option_is_dev_and_dev_env_is_present Rails::Command::ConsoleCommand.class_eval do alias_method :old_environments, :available_environments @@ -124,9 +103,7 @@ class Rails::ConsoleTest < ActiveSupport::TestCase end end - assert_deprecated do - assert_match("dev", parse_arguments(["dev"])[:environment]) - end + assert_match("dev", parse_arguments(["-e", "dev"])[:environment]) ensure Rails::Command::ConsoleCommand.class_eval do undef_method :available_environments |