Skip to content

Instantly share code, notes, and snippets.

@JonRowe
Created July 5, 2010 09:43
Show Gist options
  • Save JonRowe/464185 to your computer and use it in GitHub Desktop.
Save JonRowe/464185 to your computer and use it in GitHub Desktop.
class Capybara::Driver::RackTest
private
def env
env = {}
begin
env["HTTP_REFERER"] = request.url
env["HTTPS"] = "on" if request.url =~ /^https/
rescue Rack::Test::Error
# no request yet
end
env
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment