aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/session_migration_generator_test.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/railties/test/generators/session_migration_generator_test.rb b/railties/test/generators/session_migration_generator_test.rb
index a87eeb1e1a..57bd755a9a 100644
--- a/railties/test/generators/session_migration_generator_test.rb
+++ b/railties/test/generators/session_migration_generator_test.rb
@@ -24,9 +24,13 @@ class SessionMigrationGeneratorTest < GeneratorsTestCase
assert_migration "db/migrate/create_session_table.rb", /class CreateSessionTable < ActiveRecord::Migration/
end
- def test_session_migtions_with_custom_table_name
+ def test_session_migration_with_custom_table_name
+ ActiveRecord::SessionStore::Session.table_name = "custom_table_name"
run_generator
- assert_migration "db/migrate/add_session_table.rb", /class CreateSessionTable < ActiveRecord::Migration/
+ assert_migration "db/migrate/add_sessions_table.rb" do |migration|
+ assert_match /class AddSessionsTable < ActiveRecord::Migration/, migration
+ assert_match /create_table :custom_table_name/, migration
+ end
end
protected