diff options
Diffstat (limited to 'railties/test/commands')
-rw-r--r-- | railties/test/commands/dbconsole_test.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/railties/test/commands/dbconsole_test.rb b/railties/test/commands/dbconsole_test.rb index 2e8dd99f36..7950ed6aa7 100644 --- a/railties/test/commands/dbconsole_test.rb +++ b/railties/test/commands/dbconsole_test.rb @@ -99,19 +99,15 @@ class Rails::DBConsoleTest < ActiveSupport::TestCase end def test_rails_env_is_development_when_argument_is_dev - dbconsole = Rails::DBConsole.new - - dbconsole.stub(:available_environments, ['development', 'test']) do - options = dbconsole.send(:parse_arguments, ['dev']) + Rails::DBConsole.stub(:available_environments, ['development', 'test']) do + options = Rails::DBConsole.send(:parse_arguments, ['dev']) assert_match('development', options[:environment]) end end def test_rails_env_is_dev_when_argument_is_dev_and_dev_env_is_present - dbconsole = Rails::DBConsole.new - - dbconsole.stub(:available_environments, ['dev']) do - options = dbconsole.send(:parse_arguments, ['dev']) + Rails::DBConsole.stub(:available_environments, ['dev']) do + options = Rails::DBConsole.send(:parse_arguments, ['dev']) assert_match('dev', options[:environment]) end end |