Module: RackTestCookieDisabler::Capybara
- Defined in:
- lib/racktest_cookie_disabler/capybara.rb
Instance Method Summary collapse
Instance Method Details
#add_header(key, value) ⇒ Object
7 8 9 10 11 |
# File 'lib/racktest_cookie_disabler/capybara.rb', line 7 def add_header(key,value) current_headers = driver.browser.[:headers] || {} current_headers[key] =value driver.browser.[:headers]=current_headers end |
#disable_cookies(disable) ⇒ Object
3 4 5 |
# File 'lib/racktest_cookie_disabler/capybara.rb', line 3 def (disable) add_header('CAPYBARA_DISABLE_COOKIES',disable) end |