Class Spec::Rails::Matchers::PathDecomposer

  1. lib/spec/rails/matchers/route_to.rb
Parent: Object

Methods

public class

  1. decompose_path

Public class methods

decompose_path (path)
[show source]
# 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