diff options
author | José Valim <jose.valim@gmail.com> | 2009-08-10 18:29:20 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-08-10 18:29:20 +0200 |
commit | 5f7cfffc5377824e03432d7773ed8864a872b18c (patch) | |
tree | 53907e2e794798763c800ece8c3c9db8526ef80e /railties/test/generators/session_migration_generator_test.rb | |
parent | 600a89f2082beadf4af9fe140a1a2ae56386cd49 (diff) | |
download | rails-5f7cfffc5377824e03432d7773ed8864a872b18c.tar.gz rails-5f7cfffc5377824e03432d7773ed8864a872b18c.tar.bz2 rails-5f7cfffc5377824e03432d7773ed8864a872b18c.zip |
Use less strict rules in generators lookup, so people can lay their generators wherever they want.
Diffstat (limited to 'railties/test/generators/session_migration_generator_test.rb')
-rw-r--r-- | railties/test/generators/session_migration_generator_test.rb | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/railties/test/generators/session_migration_generator_test.rb b/railties/test/generators/session_migration_generator_test.rb index 57bd755a9a..293b903b87 100644 --- a/railties/test/generators/session_migration_generator_test.rb +++ b/railties/test/generators/session_migration_generator_test.rb @@ -2,16 +2,6 @@ require 'abstract_unit' require 'generators/generators_test_helper' require 'generators/rails/session_migration/session_migration_generator' -module ActiveRecord - module SessionStore - class Session - class << self - attr_accessor :table_name - end - end - end -end - class SessionMigrationGeneratorTest < GeneratorsTestCase def test_session_migration_with_default_name @@ -31,7 +21,10 @@ class SessionMigrationGeneratorTest < GeneratorsTestCase assert_match /class AddSessionsTable < ActiveRecord::Migration/, migration assert_match /create_table :custom_table_name/, migration end + ensure + ActiveRecord::SessionStore::Session.table_name = "sessions" end + protected def run_generator(args=[]) |