[rspec-users] Testing email w/ cucumber

Mischa Fierer f.mischa at gmail.com
Wed Dec 17 21:46:26 EST 2008

Dear all,

Wanted to let people know  that Ben Mabey has an excellent little plugin
here: http://github.com/bmabey/email-spec/tree/master

For testing e-mail.

Aaron Gibralter made some additions as well here:

I made some further changes here:

With my current version, you can do stories like below. Obviously you
wouldn't use all of those steps, but I wanted to show what is possible.

   Scenario: A new person signs up
      Given I am at "/"
      And a clear email queue
      When I fill in "Email" with "quentin at example.com"
      And I fill in "Password" with "monkey"
      And I fill in "Password confirmation" with "monkey"
      And I press "Sign up"
      Then "quentin at example.com" should receive 1 email
      And "quentin at example.com" should have 1 email
      And "foo at bar.com" should not receive an email
      When I open the email
      Then I should see "confirm" in the email
      And I should see "Account confirmation" in the subject
      When I follow "confirm" in the email
      Then I should see "Confirm your new account"


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081217/1ba56469/attachment.html>

More information about the rspec-users mailing list