diff options
author | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:37:57 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:37:57 +0200 |
commit | d22e522179c1c90e658c3ed0e9b972ec62306209 (patch) | |
tree | 3ccbdff567b79a128ad61adcbb4f2950ca9b696e /activerecord/test/cases/tasks | |
parent | fa911a74e15ef34bb435812f7d9cf7324253476f (diff) | |
download | rails-d22e522179c1c90e658c3ed0e9b972ec62306209.tar.gz rails-d22e522179c1c90e658c3ed0e9b972ec62306209.tar.bz2 rails-d22e522179c1c90e658c3ed0e9b972ec62306209.zip |
modernizes hash syntax in activerecord
Diffstat (limited to 'activerecord/test/cases/tasks')
4 files changed, 14 insertions, 14 deletions
diff --git a/activerecord/test/cases/tasks/database_tasks_test.rb b/activerecord/test/cases/tasks/database_tasks_test.rb index 946d337572..0519c70ac7 100644 --- a/activerecord/test/cases/tasks/database_tasks_test.rb +++ b/activerecord/test/cases/tasks/database_tasks_test.rb @@ -213,7 +213,7 @@ module ActiveRecord class DatabaseTasksDropAllTest < ActiveRecord::TestCase def setup - @configurations = {:development => {"database" => "my-db"}} + @configurations = {development: {"database" => "my-db"}} ActiveRecord::Base.stubs(:configurations).returns(@configurations) end @@ -374,7 +374,7 @@ module ActiveRecord class DatabaseTasksPurgeAllTest < ActiveRecord::TestCase def test_purge_all_local_configurations - configurations = {:development => {"database" => "my-db"}} + configurations = {development: {"database" => "my-db"}} ActiveRecord::Base.stubs(:configurations).returns(configurations) ActiveRecord::Tasks::DatabaseTasks.expects(:purge). diff --git a/activerecord/test/cases/tasks/mysql_rake_test.rb b/activerecord/test/cases/tasks/mysql_rake_test.rb index 16ed83b072..be2f2e5939 100644 --- a/activerecord/test/cases/tasks/mysql_rake_test.rb +++ b/activerecord/test/cases/tasks/mysql_rake_test.rb @@ -5,7 +5,7 @@ if current_adapter?(:Mysql2Adapter) module ActiveRecord class MysqlDBCreateTest < ActiveRecord::TestCase def setup - @connection = stub(:create_database => true) + @connection = stub(create_database: true) @configuration = { "adapter" => "mysql2", "database" => "my-app-db" @@ -173,7 +173,7 @@ module ActiveRecord class MySQLDBDropTest < ActiveRecord::TestCase def setup - @connection = stub(:drop_database => true) + @connection = stub(drop_database: true) @configuration = { "adapter" => "mysql2", "database" => "my-app-db" @@ -211,7 +211,7 @@ module ActiveRecord class MySQLPurgeTest < ActiveRecord::TestCase def setup - @connection = stub(:recreate_database => true) + @connection = stub(recreate_database: true) @configuration = { "adapter" => "mysql2", "database" => "test-db" @@ -245,7 +245,7 @@ module ActiveRecord class MysqlDBCharsetTest < ActiveRecord::TestCase def setup - @connection = stub(:create_database => true) + @connection = stub(create_database: true) @configuration = { "adapter" => "mysql2", "database" => "my-app-db" @@ -263,7 +263,7 @@ module ActiveRecord class MysqlDBCollationTest < ActiveRecord::TestCase def setup - @connection = stub(:create_database => true) + @connection = stub(create_database: true) @configuration = { "adapter" => "mysql2", "database" => "my-app-db" diff --git a/activerecord/test/cases/tasks/postgresql_rake_test.rb b/activerecord/test/cases/tasks/postgresql_rake_test.rb index 8c3fc8c6a1..fdfe4e979f 100644 --- a/activerecord/test/cases/tasks/postgresql_rake_test.rb +++ b/activerecord/test/cases/tasks/postgresql_rake_test.rb @@ -5,7 +5,7 @@ if current_adapter?(:PostgreSQLAdapter) module ActiveRecord class PostgreSQLDBCreateTest < ActiveRecord::TestCase def setup - @connection = stub(:create_database => true) + @connection = stub(create_database: true) @configuration = { "adapter" => "postgresql", "database" => "my-app-db" @@ -90,7 +90,7 @@ module ActiveRecord class PostgreSQLDBDropTest < ActiveRecord::TestCase def setup - @connection = stub(:drop_database => true) + @connection = stub(drop_database: true) @configuration = { "adapter" => "postgresql", "database" => "my-app-db" @@ -132,7 +132,7 @@ module ActiveRecord class PostgreSQLPurgeTest < ActiveRecord::TestCase def setup - @connection = stub(:create_database => true, :drop_database => true) + @connection = stub(create_database: true, drop_database: true) @configuration = { "adapter" => "postgresql", "database" => "my-app-db" @@ -181,7 +181,7 @@ module ActiveRecord class PostgreSQLDBCharsetTest < ActiveRecord::TestCase def setup - @connection = stub(:create_database => true) + @connection = stub(create_database: true) @configuration = { "adapter" => "postgresql", "database" => "my-app-db" @@ -199,7 +199,7 @@ module ActiveRecord class PostgreSQLDBCollationTest < ActiveRecord::TestCase def setup - @connection = stub(:create_database => true) + @connection = stub(create_database: true) @configuration = { "adapter" => "postgresql", "database" => "my-app-db" @@ -217,7 +217,7 @@ module ActiveRecord class PostgreSQLStructureDumpTest < ActiveRecord::TestCase def setup - @connection = stub(:structure_dump => true) + @connection = stub(structure_dump: true) @configuration = { "adapter" => "postgresql", "database" => "my-app-db" diff --git a/activerecord/test/cases/tasks/sqlite_rake_test.rb b/activerecord/test/cases/tasks/sqlite_rake_test.rb index 2477df2c5b..9aeeef1aee 100644 --- a/activerecord/test/cases/tasks/sqlite_rake_test.rb +++ b/activerecord/test/cases/tasks/sqlite_rake_test.rb @@ -74,7 +74,7 @@ module ActiveRecord class SqliteDBDropTest < ActiveRecord::TestCase def setup @database = "db_create.sqlite3" - @path = stub(:to_s => "/absolute/path", :absolute? => true) + @path = stub(to_s: "/absolute/path", absolute?: true) @configuration = { "adapter" => "sqlite3", "database" => @database |