Created
June 2, 2011 19:39
-
-
Save benzittlau/1005129 to your computer and use it in GitHub Desktop.
Monkey patch for using default_url_options from the application controller in cucumber tests
This file contains hidden or 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
#monkey patch to fix the fact that ActionDispatch::Integration::Session blows | |
#away the ApplicationController default_url_options which are necessary | |
#for the locale scope to work | |
module ActionDispatch | |
module Integration | |
class Session | |
def default_url_options | |
{ :host => host, :protocol => https? ? "https" : "http" }.merge!(ApplicationController.new.default_url_options) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment