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

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -