diff options
author | Mehmet Emin İNAÇ <mehmetemininac@gmail.com> | 2015-05-10 04:19:29 +0300 |
---|---|---|
committer | Mehmet Emin İNAÇ <mehmetemininac@gmail.com> | 2015-05-10 06:30:26 +0300 |
commit | 117bb5412529dc993dba86a18656f737b23ab152 (patch) | |
tree | b2572823e920eca67251585ac72107d57cb15401 /railties/test/commands | |
parent | 986fdc4e7328dd639099899f149a8d140d230a9e (diff) | |
download | rails-117bb5412529dc993dba86a18656f737b23ab152.tar.gz rails-117bb5412529dc993dba86a18656f737b23ab152.tar.bz2 rails-117bb5412529dc993dba86a18656f737b23ab152.zip |
Refactor railties console and dbconsole commands
fix minor convention problems
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 |