From 0fd5377a36ccb03b39223d0659f5452c497c9e3a Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Sun, 18 Sep 2016 19:17:12 +0200 Subject: Fix dbconsole tests. --- railties/lib/rails/commands/dbconsole/dbconsole_command.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'railties/lib') diff --git a/railties/lib/rails/commands/dbconsole/dbconsole_command.rb b/railties/lib/rails/commands/dbconsole/dbconsole_command.rb index 021714f61d..d3c80da89b 100644 --- a/railties/lib/rails/commands/dbconsole/dbconsole_command.rb +++ b/railties/lib/rails/commands/dbconsole/dbconsole_command.rb @@ -5,14 +5,12 @@ require "rails/command/environment_argument" module Rails class DBConsole - attr_reader :arguments - def self.start(*args) new(*args).start end - def initialize(arguments = ARGV, options = {}) - @arguments, @options = arguments, options + def initialize(options = {}) + @options = options end def start @@ -147,13 +145,13 @@ module Rails class_option :header, type: :string - class_option :environment, aliases: "-e", type: :string, default: Rails::Command.environment, + class_option :environment, aliases: "-e", type: :string, desc: "Specifies the environment to run this console under (test/development/production)." def perform extract_environment_option_from_argument - Rails::DBConsole.start(args, options) + Rails::DBConsole.start(options) end end end -- cgit v1.2.3