Skip to content

Instantly share code, notes, and snippets.

@dpickett
Created December 11, 2008 15:07
Show Gist options
  • Save dpickett/34737 to your computer and use it in GitHub Desktop.
Save dpickett/34737 to your computer and use it in GitHub Desktop.
class ActionView::TestCase
class TestController < ActionController::Base
attr_accessor :request, :response, :params
def initialize
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
#Hack Hack Hack: TestCase doesn't have context of a current url so cheat a bit
@params = {}
send(:initialize_current_url)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment