1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fixed ActionView::TestCase current url context [#1561 state:resolved]

Signed-off-by: Joshua Peek <josh@joshpeek.com>
This commit is contained in:
Dan Pickett 2008-12-15 11:47:39 -06:00 committed by Joshua Peek
parent 07326b38ec
commit 38412ecb5d
2 changed files with 12 additions and 1 deletions

View file

@ -60,11 +60,14 @@ module ActionView
end
class TestController < ActionController::Base
attr_accessor :request, :response
attr_accessor :request, :response, :params
def initialize
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
@params = {}
send(:initialize_current_url)
end
end

View file

@ -0,0 +1,8 @@
require 'abstract_unit'
class TestCaseTest < ActionView::TestCase
def test_should_have_current_url
controller = TestController.new
assert_nothing_raised(NoMethodError){ controller.url_for({:controller => "foo", :action => "index"}) }
end
end