Permalink
Browse files

Fix tests, table_name= needs connection now, so just stub table_name

  • Loading branch information...
1 parent 393c2dd commit c8f6025fd37c7b5c8922b11eb5ceba22e4650b59 @drogus drogus committed Mar 4, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/test/generators/session_migration_generator_test.rb
@@ -15,7 +15,7 @@ def test_session_migration_with_given_name
end
def test_session_migration_with_custom_table_name
- ActiveRecord::SessionStore::Session.table_name = "custom_table_name"
+ ActiveRecord::SessionStore::Session.stubs(:table_name => "custom_table_name")
run_generator
assert_migration "db/migrate/add_sessions_table.rb" do |migration|
assert_match(/class AddSessionsTable < ActiveRecord::Migration/, migration)

3 comments on commit c8f6025

Member

Hmm, table_name= should not need a connection. I guess this is due to @kennyj's recent changes. @kennyj would you mind looking at making sure that reset_column_information doesn't try to do anything with the connection if the model is not connected? (And revert this commit with your PR.) Thanks!

Contributor

@jonleighton I'll fix it after work :)

Contributor

I sent a PR #5304

Please sign in to comment.