Revert table_name= needs connection now, so just stub table_name #5304

Merged
merged 1 commit into from Mar 6, 2012
@@ -118,7 +118,7 @@ def table_name=(value)
if defined?(@table_name)
return if value == @table_name
- reset_column_information
+ reset_column_information if connected?
end
@table_name = value
@@ -15,7 +15,7 @@ def test_session_migration_with_given_name
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)