Permalink
Browse files

test refactor, don't hardcode default for `table_name_prefix`.

  • Loading branch information...
1 parent 89845ff commit d23cbbb3ee8f49441873b713ee0255c22895e332 @senny senny committed Jun 6, 2014
Showing with 2 additions and 1 deletion.
  1. +2 −1 activerecord/test/cases/ar_schema_test.rb
@@ -34,6 +34,7 @@ def test_schema_define
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 @@ def test_schema_define_w_table_name_prefix
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

0 comments on commit d23cbbb

Please sign in to comment.