From 1b27f5c4f72384081083fa025b6b10e5ab02ae5e Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Tue, 15 Dec 2009 22:07:12 -0800 Subject: Add the ability for plugins to set default configuration settings. --- railties/test/application/configuration_test.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'railties/test/application/configuration_test.rb') diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 1fcab8c651..89337b7f66 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -53,5 +53,26 @@ module ApplicationTests assert_raises(NoMethodError) { 1.day } end end + + test "marking the application as threadsafe sets the correct config variables" do + add_to_config <<-RUBY + config.threadsafe! + RUBY + + require "#{app_path}/config/application" + assert AppTemplate.configuration.action_controller.allow_concurrency + end + + test "the application can be marked as threadsafe when there are no frameworks" do + FileUtils.rm_rf("#{app_path}/config/environments") + add_to_config <<-RUBY + config.frameworks = [] + config.threadsafe! + RUBY + + assert_nothing_raised do + require "#{app_path}/config/application" + end + end end end -- cgit v1.2.3