From 2afc01b7ce6283a3c5e62b92890be8cd77f9455f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 21 Feb 2007 00:40:58 +0000 Subject: Make assert_select access content_type through accessor instead of header git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6181 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/assertions/selector_assertions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/assertions/selector_assertions.rb b/actionpack/lib/action_controller/assertions/selector_assertions.rb index a5e022662c..8de23c1f27 100644 --- a/actionpack/lib/action_controller/assertions/selector_assertions.rb +++ b/actionpack/lib/action_controller/assertions/selector_assertions.rb @@ -551,7 +551,7 @@ module ActionController # #assert_select and #css_select call this to obtain the content in the HTML # page, or from all the RJS statements, depending on the type of response. def response_from_page_or_rjs() - content_type = @response.headers["Content-Type"] + content_type = @response.content_type if content_type && content_type =~ /text\/javascript/ body = @response.body.dup root = HTML::Node.new(nil) -- cgit v1.2.3