Merge pull request #5304 from kennyj/fix_connection_dependency

Revert table_name= needs connection now, so just stub table_name
This commit is contained in:
Aaron Patterson 2012-03-06 11:25:24 -08:00
commit f3a3203b00
2 changed files with 2 additions and 2 deletions

@ -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)