Skip to content

Instantly share code, notes, and snippets.

@benzittlau
Created June 2, 2011 19:39
Show Gist options
  • Save benzittlau/1005129 to your computer and use it in GitHub Desktop.
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
#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