selenium - Rails capybara cookies issue -
how work cookies inside capybara?
in application_helper.rb
have method cookies
def user_currency(currency) cookies[:user_currency] = currency end
but when want use method in test
it returns me
undefined local variable or method `cookies' #<rspec::examplegroups
how handle it?
cookie manipulation different each capybara driver. easiest solution use show_me_the_cookies gem provides unified api. note drivers can set cookies domains visiting.
Comments
Post a Comment