Permalink
Browse files

Temporary fix for railties test for newest rack changes

  • Loading branch information...
1 parent 13e5a26 commit 37e643120a5f4ba9fa15b74d6f489f7a0bb66c0d @drogus drogus committed Dec 19, 2010
Showing with 8 additions and 0 deletions.
  1. +8 −0 railties/test/railties/engine_test.rb
@@ -358,14 +358,17 @@ def bar
env = Rack::MockRequest.env_for("/foo")
response = Rails.application.call(env)
assert_equal rack_body(["Something... Something... Something..."]), rack_body(response[2])
+ response[2].close
env = Rack::MockRequest.env_for("/foo/show")
response = Rails.application.call(env)
assert_equal rack_body(["/foo"]), rack_body(response[2])
+ response[2].close
env = Rack::MockRequest.env_for("/foo/bar")
response = Rails.application.call(env)
assert_equal rack_body(["It's a bar."]), rack_body(response[2])
+ response[2].close
end
test "isolated engine should include only its own routes and helpers" do
@@ -467,22 +470,27 @@ class MyMailer < ActionMailer::Base
env = Rack::MockRequest.env_for("/bukkits/from_app")
response = AppTemplate::Application.call(env)
assert_equal rack_body(["false"]), rack_body(response[2])
+ response[2].close
env = Rack::MockRequest.env_for("/bukkits/foo/show")
response = AppTemplate::Application.call(env)
assert_equal rack_body(["/bukkits/foo"]), rack_body(response[2])
+ response[2].close
env = Rack::MockRequest.env_for("/bukkits/foo")
response = AppTemplate::Application.call(env)
assert_equal rack_body(["Helped."]), rack_body(response[2])
+ response[2].close
env = Rack::MockRequest.env_for("/bukkits/routes_helpers_in_view")
response = AppTemplate::Application.call(env)
assert_equal rack_body(["/bukkits/foo, /bar"]), rack_body(response[2])
+ response[2].close
env = Rack::MockRequest.env_for("/bukkits/polymorphic_path_without_namespace")
response = AppTemplate::Application.call(env)
assert_equal rack_body(["/bukkits/posts/1"]), rack_body(response[2])
+ response[2].close
end
test "isolated engine should avoid namespace in names if that's possible" do

0 comments on commit 37e6431

Please sign in to comment.