diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-05-10 01:04:56 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-05-10 01:04:56 -0300 |
commit | 7fb45a6130598703b3da8fe9ef29a5c7a1eb9d09 (patch) | |
tree | b2572823e920eca67251585ac72107d57cb15401 /railties/test | |
parent | 986fdc4e7328dd639099899f149a8d140d230a9e (diff) | |
parent | 117bb5412529dc993dba86a18656f737b23ab152 (diff) | |
download | rails-7fb45a6130598703b3da8fe9ef29a5c7a1eb9d09.tar.gz rails-7fb45a6130598703b3da8fe9ef29a5c7a1eb9d09.tar.bz2 rails-7fb45a6130598703b3da8fe9ef29a5c7a1eb9d09.zip |
Merge pull request #20094 from vngrs/refactor_railties_commands
Refactor railties console and dbconsole commands
Diffstat (limited to 'railties/test')
-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 |