开发者

Creating cookies in cucumber

开发者 https://www.devze.com 2023-03-10 01:42 出处:网络
I am trying to begin testing using cucumber however, when I write this: Given /^I am not authenticated$/ do

I am trying to begin testing using cucumber however, when I write this:

Given /^I am not authenticated$/ do
  cookies.permanent.signed[:user_id] = nil
end

I get this error

undefined method `permanent' for #<Rack::Test::CookieJar:0x00000100f8f8f8> (NoMethodError)
      ./features/step_definitions/sign_up_steps.rb:2:in `/^I am not authenticated$/'
      features/sign_up.feature:8:in `And I am开发者_开发知识库 not authenticated'
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号