diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/middleware_test.rb | 6 | ||||
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb index bab17d8af5..aa75fed793 100644 --- a/railties/test/application/middleware_test.rb +++ b/railties/test/application/middleware_test.rb @@ -57,6 +57,12 @@ module ApplicationTests assert !middleware.include?("ActionDispatch::Static") end + test "can delete a middleware from the stack" do + add_to_config "config.middleware.delete ActionDispatch::Static" + boot! + assert !middleware.include?("ActionDispatch::Static") + end + test "removes show exceptions if action_dispatch.show_exceptions is disabled" do add_to_config "config.action_dispatch.show_exceptions = false" boot! diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 6f4c5d77f3..b46ac0efaf 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -232,7 +232,7 @@ Module.new do require_environment = "-r #{environment}" end - `#{Gem.ruby} #{require_environment} #{RAILS_FRAMEWORK_ROOT}/bin/rails #{tmp_path('app_template')}` + `#{Gem.ruby} #{require_environment} #{RAILS_FRAMEWORK_ROOT}/bin/rails new #{tmp_path('app_template')}` File.open("#{tmp_path}/app_template/config/boot.rb", 'w') do |f| if require_environment f.puts "Dir.chdir('#{File.dirname(environment)}') do" |