Class: VRaptorMatchers::Render
- Inherits:
-
Object
- Object
- VRaptorMatchers::Render
- Defined in:
- lib/spec/vraptor/matchers.rb
Instance Method Summary collapse
- #failure_message ⇒ Object
-
#initialize(target) ⇒ Render
constructor
A new instance of Render.
- #matches?(request) ⇒ Boolean
Constructor Details
#initialize(target) ⇒ Render
Returns a new instance of Render.
22 23 24 |
# File 'lib/spec/vraptor/matchers.rb', line 22 def initialize(target) @target = "/#{target}" end |
Instance Method Details
#failure_message ⇒ Object
31 32 33 |
# File 'lib/spec/vraptor/matchers.rb', line 31 def "expected request to render #{@target}, is rendering #{@dispatcher.target}" end |
#matches?(request) ⇒ Boolean
26 27 28 29 |
# File 'lib/spec/vraptor/matchers.rb', line 26 def matches?(request) @dispatcher = request.dispatcher @dispatcher.target.eql? @target end |