1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Revert table_name= needs connection now, so just stub table_name

This commit is contained in:
kennyj 2012-03-07 02:37:40 +09:00
parent f0ad8532f3
commit f2b048529b
2 changed files with 2 additions and 2 deletions

View file

@ -118,7 +118,7 @@ module ActiveRecord
if defined?(@table_name)
return if value == @table_name
reset_column_information
reset_column_information if connected?
end
@table_name = value

View file

@ -15,7 +15,7 @@ class SessionMigrationGeneratorTest < Rails::Generators::TestCase
end
def test_session_migration_with_custom_table_name
ActiveRecord::SessionStore::Session.stubs(:table_name => "custom_table_name")
ActiveRecord::SessionStore::Session.table_name = "custom_table_name"
run_generator
assert_migration "db/migrate/add_sessions_table.rb" do |migration|
assert_match(/class AddSessionsTable < ActiveRecord::Migration/, migration)