Skip to content

Commit

Permalink
test helper fix
Browse files Browse the repository at this point in the history
  • Loading branch information
francesc committed Jun 20, 2012
1 parent fd90dcd commit 2f7b629
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/controller_test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This monkey patch injects the locale in the controller's params
# This monkey patch injects the locale in the controller's params
# Reason: ActionController::TestCase doesn't support "default_url_options"
#
# Example: when the request you are testing needs the locale, e.g.
Expand All @@ -11,7 +11,7 @@ class ActionController::TestCase

module Behavior
def process_with_default_locale(action, parameters = nil, session = nil, flash = nil, http_method = 'GET')
parameters = { :locale => I18n.default_locale }.merge(parameters || {} )
parameters = { :locale => I18n.default_locale.to_s }.merge(parameters || {} )
process_without_default_locale(action, parameters, session, flash, http_method)
end
alias_method_chain :process, :default_locale
Expand Down

0 comments on commit 2f7b629

Please sign in to comment.