From 163152bfd0ea5344472d24b6f89e8c957dbd66f5 Mon Sep 17 00:00:00 2001 From: David Chelimsky Date: Tue, 25 May 2010 00:34:55 -0500 Subject: Support configuration of controller.controller_path on instances of ActionView::TestCase::TestController without stubs. Just say: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @controller.controller_path = "path/i/need/for/this/test" [#4697 state:resolved] Signed-off-by: José Valim --- actionpack/lib/action_view/test_case.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb index 2c66e5ae09..e71761db6d 100644 --- a/actionpack/lib/action_view/test_case.rb +++ b/actionpack/lib/action_view/test_case.rb @@ -10,11 +10,16 @@ module ActionView attr_accessor :request, :response, :params - def self.controller_path - '' + class << self + attr_writer :controller_path + end + + def controller_path=(path) + self.class.controller_path=(path) end def initialize + self.class.controller_path = "" @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new -- cgit v1.2.3