From efd808755cac74f0001907a1d635856160d11f6a Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Thu, 15 Sep 2016 21:56:03 +0200 Subject: Fix console tests. --- railties/lib/rails/command/environment_argument.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'railties/lib/rails/command') diff --git a/railties/lib/rails/command/environment_argument.rb b/railties/lib/rails/command/environment_argument.rb index bff076adc9..05eac34155 100644 --- a/railties/lib/rails/command/environment_argument.rb +++ b/railties/lib/rails/command/environment_argument.rb @@ -13,6 +13,8 @@ module Rails def extract_environment_option_from_argument if environment self.options = options.merge(environment: acceptable_environment(environment)) + elsif !options[:environment] + self.options = options.merge(environment: Rails::Command.environment) end end -- cgit v1.2.3