Class: Spec::Rails::Matchers::PathDecomposer
- Inherits:
-
Object
- Object
- Spec::Rails::Matchers::PathDecomposer
- Defined in:
- lib/spec/rails/matchers/route_to.rb
Class Method Summary collapse
Class Method Details
.decompose_path(path) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/spec/rails/matchers/route_to.rb', line 9 def self.decompose_path(path) method, path = if Hash === path raise USAGE if path.keys.size > 1 path.entries.first else [:get, path] end path, querystring = path.split('?') return method, path, querystring end |