Permalink
Browse files

Fix render matcher

  • Loading branch information...
1 parent 279fe88 commit f2ca8edce6ac9942f6d3523ad7dd310ca8ecf279 @jomz jomz committed Feb 23, 2014
Showing with 4 additions and 4 deletions.
  1. +4 −4 spec/matchers/render_matcher.rb
@@ -85,7 +85,7 @@ def on(url)
url = test_host + "/" + url unless url =~ %r{^[^/]+\.[^/]+}
url = 'http://' + url unless url =~ %r{^http://}
uri = URI.parse(url)
- @fullpath = uri.fullpath unless uri.fullpath == '/'
+ @fullpath = uri.path unless uri.path == '/'
@host = uri.host
self
end
@@ -97,12 +97,12 @@ def with_relative_root(url="/")
private
def render_content_with_page(tag_content, page)
- page.request = ActionController::TestRequest.new
+ page.request = ActionDispatch::TestRequest.new
page.request.params[:sample_param] = 'data'
- page.request.fullpath = @fullpath || page.url
+ page.request.path = @fullpath || page.url
page.request.host = @host || test_host
ActionController::Base.relative_url_root = @relative_root
- page.response = ActionController::TestResponse.new
+ page.response = ActionDispatch::TestResponse.new
if tag_content.nil?
page.render
else

0 comments on commit f2ca8ed

Please sign in to comment.