lib/exception_handling/testing.rb in exception_handling-3.0.pre.1 vs lib/exception_handling/testing.rb in exception_handling-3.0.0.pre.2

- old
+ new

@@ -2,11 +2,11 @@ # some useful test objects module ExceptionHandling module Testing - class ControllerStub + class ControllerStubBase class Request attr_accessor :parameters, :protocol, :host, :request_uri, :env, :session_options def initialize @@ -23,11 +23,11 @@ class << self attr_accessor :around_filter_method def around_filter(method) - ControllerStub.around_filter_method = method + self.around_filter_method = method end end def initialize @request = Request.new @@ -42,26 +42,23 @@ else {} end end - def simulate_around_filter(&block) - set_current_controller(&block) - end - - def controller_name - "ControllerStub" - end - def action_name "test_action" end def complete_request_uri "#{@request.protocol}#{@request.host}#{@request.request_uri}" end + end - include ExceptionHandling::Methods - set_long_controller_action_timeout 2 + class LoggingMethodsControllerStub < ControllerStubBase + include ExceptionHandling::LoggingMethods + + def controller_name + "LoggingMethodsControllerStub" + end end end end