module Controller::Testing::Kwargs
Constants
- ERROR_MESSAGE
- VERSION
Attributes
action[R]
Public Class Methods
deprecate()
click to toggle source
# File lib/controller/testing/kwargs.rb, line 14 def deprecate @action = :deprecation_warning end
deprecated?()
click to toggle source
# File lib/controller/testing/kwargs.rb, line 18 def deprecated? @action == :deprecation_warning end
ignore()
click to toggle source
# File lib/controller/testing/kwargs.rb, line 22 def ignore @action = nil end
raise_exception()
click to toggle source
# File lib/controller/testing/kwargs.rb, line 26 def raise_exception @action = :raise_exceptioon end
raise_exception?()
click to toggle source
# File lib/controller/testing/kwargs.rb, line 30 def raise_exception? @action == :raise_exceptioon end
Private Class Methods
with_ignore() { || ... }
click to toggle source
# File lib/controller/testing/kwargs.rb, line 36 def with_ignore previous_action = @action @action = nil begin yield ensure @action = previous_action end end
Public Instance Methods
xhr(request_method, action, parameters = nil, *args)
click to toggle source
Calls superclass method
# File lib/controller/testing/kwargs.rb, line 82 def xhr(request_method, action, parameters = nil, *args) raise Exception ERROR_MESSAGE if Controller::Testing::Kwargs.raise_exception? ActiveSupport::Deprecation.warn(ERROR_MESSAGE) if Controller::Testing::Kwargs.deprecated? super(request_method, action, parameters, *args) end