黄瓜> watir-webdriver>电子邮件规范:如何测试?

时间:2012-07-05 11:49:36

标签: email cucumber watir-webdriver specifications

那么,请问我一个例子,我如何使用watir-webdriver在黄瓜中使用电子邮件规范。

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

和hier: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)

1 个答案:

答案 0 :(得分:0)

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

require 'delayed_job'

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

相关问题