mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
test refactor, don't hardcode default for table_name_prefix
.
This commit is contained in:
parent
89845ff866
commit
d23cbbb3ee
1 changed files with 2 additions and 1 deletions
|
@ -34,6 +34,7 @@ if ActiveRecord::Base.connection.supports_migrations?
|
|||
|
||||
def test_schema_define_w_table_name_prefix
|
||||
table_name = ActiveRecord::SchemaMigration.table_name
|
||||
old_table_name_prefix = ActiveRecord::Base.table_name_prefix
|
||||
ActiveRecord::Base.table_name_prefix = "nep_"
|
||||
ActiveRecord::SchemaMigration.table_name = "nep_#{table_name}"
|
||||
ActiveRecord::Schema.define(:version => 7) do
|
||||
|
@ -46,7 +47,7 @@ if ActiveRecord::Base.connection.supports_migrations?
|
|||
end
|
||||
assert_equal 7, ActiveRecord::Migrator::current_version
|
||||
ensure
|
||||
ActiveRecord::Base.table_name_prefix = ""
|
||||
ActiveRecord::Base.table_name_prefix = old_table_name_prefix
|
||||
ActiveRecord::SchemaMigration.table_name = table_name
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue