diff options
author | Jon McCartie <jon@mccartie.com> | 2015-10-22 09:11:42 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-10-23 21:34:00 -0200 |
commit | f0323288da939f57641b82041cb1a86a1e526746 (patch) | |
tree | af45e828083fb8a6361889fc93b0a8b12a4a99ae /railties/test/generators | |
parent | f94e328cf801fd5c8055b06c4ee5439273146833 (diff) | |
download | rails-f0323288da939f57641b82041cb1a86a1e526746.tar.gz rails-f0323288da939f57641b82041cb1a86a1e526746.tar.bz2 rails-f0323288da939f57641b82041cb1a86a1e526746.zip |
Move default uuid generation to active_record
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/migration_generator_test.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/railties/test/generators/migration_generator_test.rb b/railties/test/generators/migration_generator_test.rb index a7f807b747..832bf8d2d4 100644 --- a/railties/test/generators/migration_generator_test.rb +++ b/railties/test/generators/migration_generator_test.rb @@ -222,8 +222,9 @@ class MigrationGeneratorTest < Rails::Generators::TestCase end def test_add_uuid_to_create_table_migration - previous_value = Rails.application.config.active_record.primary_key - Rails.application.config.active_record.primary_key = :uuid + previous_value = Rails.application.config.generators.active_record[:primary_key_type] + Rails.application.config.generators.active_record[:primary_key_type] = :uuid + run_generator ["create_books"] assert_migration "db/migrate/create_books.rb" do |content| assert_method :change, content do |change| @@ -231,7 +232,7 @@ class MigrationGeneratorTest < Rails::Generators::TestCase end end - Rails.application.config.active_record.primary_key = previous_value + Rails.application.config.generators.active_record[:primary_key_type] = previous_value end def test_should_create_empty_migrations_if_name_not_start_with_add_or_remove_or_create |