Class: Lolita::Test::Matchers::BeRoutable
- Defined in:
- lib/lolita/test/matchers.rb
Instance Method Summary collapse
Instance Method Details
#failure_message ⇒ Object
18 19 20 |
# File 'lib/lolita/test/matchers.rb', line 18 def "expected #{@url.inspect}#{@method ? " with method #{@method.inspect}" : ""} to be routable" end |
#matches?(actual) ⇒ Boolean
8 9 10 11 12 13 14 15 16 |
# File 'lib/lolita/test/matchers.rb', line 8 def matches?(actual) @actual=actual collect_routes set_method_and_url result=@routes.detect{|route| method_match(route) && @url.to_s.match(route[:path_info]) } !!result end |
#negative_failure_message ⇒ Object
21 22 23 |
# File 'lib/lolita/test/matchers.rb', line 21 def "expected #{@url.inspect}#{@method ? " with method #{@method.inspect}" : ""} to not be routable" end |