diff options
author | Xavier Noria <fxn@hashref.com> | 2010-06-08 21:23:29 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-06-08 21:23:29 +0200 |
commit | 751f79a03351f1f0d21436b2b947352b97ded093 (patch) | |
tree | 9dd053597389241398c9173ab7f565697bef055f /railties/test | |
parent | e7e6ee3e7b075f5447697a6038cb46d65f9b137a (diff) | |
parent | ab2877cbe89e266ee986fc12e603abd93ac017ad (diff) | |
download | rails-751f79a03351f1f0d21436b2b947352b97ded093.tar.gz rails-751f79a03351f1f0d21436b2b947352b97ded093.tar.bz2 rails-751f79a03351f1f0d21436b2b947352b97ded093.zip |
Merge remote branch 'rails/master'
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/middleware_test.rb | 6 | ||||
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 4 | ||||
-rw-r--r-- | railties/test/isolation/abstract_unit.rb | 2 |
3 files changed, 8 insertions, 4 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/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 3975a39ab1..8bd9dc9f39 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -70,9 +70,7 @@ class AppGeneratorTest < Rails::Generators::TestCase end def test_name_collision_raises_an_error - reserved_words = %w[generate g console c server s dbconsole db - application destroy benchmarker profiler - plugin runner test] + reserved_words = %w[application destroy plugin runner test] reserved_words.each do |reserved| content = capture(:stderr){ run_generator [File.join(destination_root, reserved)] } assert_equal "Invalid application name #{reserved}. Please give a name which does not match one of the reserved rails words.\n", content 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" |