aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/app_generator_test.rb
diff options
context:
space:
mode:
authorPrathamesh Sonpatki <csonpatki@gmail.com>2016-07-17 19:38:54 +0530
committerPrathamesh Sonpatki <csonpatki@gmail.com>2016-07-17 19:45:51 +0530
commite5a6f7ee9e951dbe0e4e9ea2c0743b4dfb135c57 (patch)
treec453ef5911af803843705f7790c6ba05e70d5e24 /railties/test/generators/app_generator_test.rb
parentfd8ab8781488923c034200b83278d10dd8c90ba6 (diff)
downloadrails-e5a6f7ee9e951dbe0e4e9ea2c0743b4dfb135c57.tar.gz
rails-e5a6f7ee9e951dbe0e4e9ea2c0743b4dfb135c57.tar.bz2
rails-e5a6f7ee9e951dbe0e4e9ea2c0743b4dfb135c57.zip
Setup default session store internally, no longer through an application initializer
- By default the session store will be set to cookie store with application name as session key. - Older apps are not affected as they will have the session store initializer generated by Rails in older versions, and Rails will not overwrite the session store if it is already set or disabled. - But new apps will not have the initializer, instead the session store will be set to cookie store by default. - Based on comment by DHH here - https://github.com/rails/rails/issues/25181#issuecomment-222312764.
Diffstat (limited to 'railties/test/generators/app_generator_test.rb')
-rw-r--r--railties/test/generators/app_generator_test.rb10
1 files changed, 0 insertions, 10 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index ac1488abb3..50751368c8 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -131,7 +131,6 @@ class AppGeneratorTest < Rails::Generators::TestCase
generator.send(:app_const)
quietly { generator.send(:update_config_files) }
assert_file "myapp_moved/config/environment.rb", /Rails\.application\.initialize!/
- assert_file "myapp_moved/config/initializers/session_store.rb", /_myapp_session/
end
end
end
@@ -144,7 +143,6 @@ class AppGeneratorTest < Rails::Generators::TestCase
generator = Rails::Generators::AppGenerator.new ["rails"], [], destination_root: app_root, shell: @shell
generator.send(:app_const)
quietly { generator.send(:update_config_files) }
- assert_file "myapp/config/initializers/session_store.rb", /_myapp_session/
end
end
@@ -552,13 +550,6 @@ class AppGeneratorTest < Rails::Generators::TestCase
assert_file "config/application.rb", /\s+require\s+["']active_job\/railtie["']/
end
- def test_new_hash_style
- run_generator
- assert_file "config/initializers/session_store.rb" do |file|
- assert_match(/config.session_store :cookie_store, key: '_.+_session'/, file)
- end
- end
-
def test_pretend_option
output = run_generator [File.join(destination_root, "myapp"), "--pretend"]
assert_no_match(/run bundle install/, output)
@@ -571,7 +562,6 @@ class AppGeneratorTest < Rails::Generators::TestCase
run_generator [path, "-d", 'postgresql']
assert_file "foo bar/config/database.yml", /database: foo_bar_development/
- assert_file "foo bar/config/initializers/session_store.rb", /key: '_foo_bar/
end
def test_web_console