Skip to content

Instantly share code, notes, and snippets.

@dmitry
Created July 11, 2014 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmitry/bd914abec56a1b82d295 to your computer and use it in GitHub Desktop.
Save dmitry/bd914abec56a1b82d295 to your computer and use it in GitHub Desktop.
puffing-billy
require 'puffing-billy'
require 'billy'
Capybara.javascript_driver = :poltergeist_billy
Billy.configure do |c|
c.cache = true
c.cache_request_headers = true
c.ignore_params = []
c.path_blacklist = []
c.persist_cache = true
c.ignore_cache_port = true # defaults to true
c.non_successful_cache_disabled = false
c.non_successful_error_level = :warn
c.non_whitelisted_requests_disabled = false
c.cache_path = 'test/http_caching/'
end
Billy.config.whitelist = ['localhost', '127.0.0.1']
Billy.register_drivers
def proxy
Billy.proxy
end
Capybara.current_driver = :poltergeist_billy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment