Class: Shoulda::Matchers::ActionController::RouteParams

Inherits:
Object
  • Object
show all
Defined in:
lib/shoulda/matchers/action_controller/route_params.rb

Constant Summary collapse

PARAMS_TO_SYMBOLIZE =
%i{format}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ RouteParams

Returns a new instance of RouteParams.



8
9
10
# File 'lib/shoulda/matchers/action_controller/route_params.rb', line 8

def initialize(args)
  @args = args
end

Instance Method Details

#normalizeObject



12
13
14
15
16
17
18
# File 'lib/shoulda/matchers/action_controller/route_params.rb', line 12

def normalize
  if controller_and_action_given_as_string?
    extract_params_from_string
  else
    stringify_params
  end
end