Created
December 2, 2011 16:03
-
-
Save spalladino/1423757 to your computer and use it in GitHub Desktop.
Default request parameters in Rails functional tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ActionController::TestCase < ActiveSupport::TestCase | |
module Behavior | |
def process_with_default_params(action, parameters = nil, session = nil, flash = nil, http_method = 'GET') | |
default_params = {:locale => :en} | |
parameters ||= {} | |
parameters.reverse_merge! default_params | |
process_without_default_params(action, parameters, session, flash, http_method) | |
end | |
alias_method_chain :process, :default_params | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment