Email Cucumber(使用watir webdriver):未定义的方法`confirmation_token';
我怎样才能在cucumber中使用确认令牌?我需要这个来测试注册,而不需要检查电子邮件 我的代码:Email Cucumber(使用watir webdriver):未定义的方法`confirmation_token';,email,cucumber,watir-webdriver,confirmation,specifications,Email,Cucumber,Watir Webdriver,Confirmation,Specifications,我怎样才能在cucumber中使用确认令牌?我需要这个来测试注册,而不需要检查电子邮件 我的代码: @b.text_field(:name => 'profile[prename]').set 'Kurt' @b.text_field(:name => 'profile[surname]').set 'Russell' @b.text_field(:id => 'profile_email').set 'user@trash-mail.com' @b.te
@b.text_field(:name => 'profile[prename]').set 'Kurt'
@b.text_field(:name => 'profile[surname]').set 'Russell'
@b.text_field(:id => 'profile_email').set 'user@trash-mail.com'
@b.text_field(:id => 'profile_password').set 'password'
@b.text_field(:name => 'profile[password_confirmation]').set 'password'
@b.button(:id => 'profile_submit').click
@ctoken = Profile.last.confirmation_token
@b.goto("http://localhost:3000/profiles/confirmation?confirmation_token=#{@ctoken}")
或:
我成为nil:NilClass(NoMethodError)的未定义方法“确认\u标记”在我看来是
配置文件。在您的情况下,最后一个返回nil
,因此出现错误消息nil:NilClass(NoMethodError)的未定义方法确认\u标记。请在定义配置文件的位置共享代码
如何找到此确认\u令牌路径?我不知道这是什么。什么是Profile
?它是如何定义的?
@b.goto("http://localhost:3000/profiles/confirmation?confirmation_token=#{Profile.last.confirmation_token}")