Class: VRaptorMatchers::RedirectTo
- Inherits:
-
Object
- Object
- VRaptorMatchers::RedirectTo
- Defined in:
- lib/spec/vraptor/matchers.rb
Instance Method Summary collapse
- #failure_message ⇒ Object
-
#initialize(path) ⇒ RedirectTo
constructor
A new instance of RedirectTo.
- #matches?(response) ⇒ Boolean
Constructor Details
#initialize(path) ⇒ RedirectTo
Returns a new instance of RedirectTo.
3 4 5 |
# File 'lib/spec/vraptor/matchers.rb', line 3 def initialize(path) @path = path end |
Instance Method Details
#failure_message ⇒ Object
12 13 14 |
# File 'lib/spec/vraptor/matchers.rb', line 12 def "expected response to redirect to #{@path}, is redirecting to #{@response.destination}" end |
#matches?(response) ⇒ Boolean
7 8 9 10 |
# File 'lib/spec/vraptor/matchers.rb', line 7 def matches?(response) @response = response @response.destination.eql? @path end |