【问题标题】:Cucumber > watir-webdriver > email spec: how to test?Cucumber > watir-webdriver > email spec:如何测试?
【发布时间】:2012-07-05 11:49:36
【问题描述】:

那么,你能不能给我写一个例子,我如何在黄瓜中使用电子邮件规范和 watir-webdriver。

我找不到他:https://github.com/bmabey/email-spec

及上级:https://github.com/bmabey/email-spec/wiki/Use-Cucumber-to-Test-Email

它对我不起作用... :(

Then /^I should receive an email with a link to a confirmation page$/ do
  unread_emails_for(current_email_address).size.should == 1  
  open_last_email_for(last_email_address)
  current_email.should have_subject(/ALPHAJUMP: Bitte bestätigen Sie Ihre Registrierung./)
  current_email.should have_body_text('Herzlich willkommen')
  click_email_link_matching /Jetzt freischalten/
  page.should have_content("Wir begrüßen Sie auf ALPHAJUMP!")
end

错误消息:预期:1 得到:0(使用 ==)(RSpec::Expectations::ExpectationNotMetError)

【问题讨论】:

  • 你没有说是什么问题。 “不起作用”的数据不够。
  • 错误:未初始化的常量Delayed::Job (NameError) 但我不使用Delayed_job。我应该使用它吗?
  • 请提供导致错误的代码。

标签: email cucumber watir-webdriver specifications


【解决方案1】:

我认为错误消息表明您不需要delayed_job gem。这可以解决问题:

require 'delayed_job'

由于这不是问题的标题,我想你还不知道如何用 Cucumber 测试电子邮件,但我想这应该是另一个问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-31
    • 2015-07-07
    • 1970-01-01
    • 1970-01-01
    • 2012-07-05
    • 2011-06-21
    相关资源
    最近更新 更多