Permalink
Browse files

Style: remove hash noise

  • Loading branch information...
jeremy committed Sep 21, 2012
1 parent 78b30fe commit 7174307bd8b7ddb0bd3ec1a5937f03e8ce80a5e4
Showing with 10 additions and 10 deletions.
  1. +10 −10 activerecord/test/cases/tasks/mysql_rake_test.rb
@@ -74,8 +74,9 @@ def setup
$stdout.stubs(:print).returns(nil)
@error.stubs(:errno).returns(1045)
ActiveRecord::Base.stubs(:connection).returns(@connection)
- ActiveRecord::Base.stubs(:establish_connection).raises(@error).then.
- returns(true)
+ ActiveRecord::Base.stubs(:establish_connection).
+ raises(@error).
+ then.returns(true)
end
def test_root_password_is_requested
@@ -86,12 +87,12 @@ def test_root_password_is_requested
end
def test_connection_established_as_root
- ActiveRecord::Base.expects(:establish_connection).with({
+ ActiveRecord::Base.expects(:establish_connection).with(
'adapter' => 'mysql',
'database' => nil,
'username' => 'root',
'password' => 'secret'
- })
+ )
ActiveRecord::Tasks::DatabaseTasks.create @configuration
end
@@ -111,12 +112,12 @@ def test_grant_privileges_for_normal_user
def test_connection_established_as_normal_user
ActiveRecord::Base.expects(:establish_connection).returns do
- ActiveRecord::Base.expects(:establish_connection).with({
+ ActiveRecord::Base.expects(:establish_connection).with(
'adapter' => 'mysql',
'database' => 'my-app-db',
'username' => 'pat',
'password' => 'secret'
- })
+ )
raise @error
end
@@ -178,18 +179,17 @@ def test_establishes_connection_to_test_database
def test_recreates_database_with_the_default_options
@connection.expects(:recreate_database).
- with('test-db', { :charset => 'utf8', :collation => 'utf8_unicode_ci' })
+ with('test-db', charset: 'utf8', collation: 'utf8_unicode_ci')
ActiveRecord::Tasks::DatabaseTasks.purge @configuration
end
def test_recreates_database_with_the_given_options
@connection.expects(:recreate_database).
- with('test-db', { :charset => 'latin', :collation => 'latin_ci' })
+ with('test-db', charset: 'latin', collation: 'latin1_swedish_ci')
ActiveRecord::Tasks::DatabaseTasks.purge @configuration.merge(
- 'encoding' => 'latin', 'collation' => 'latin_ci'
- )
+ 'encoding' => 'latin', 'collation' => 'latin1_swedish_ci')
end
end

0 comments on commit 7174307

Please sign in to comment.