Testing email w/ cucumber

Dear all,

Wanted to let people know that Ben M. has an excellent little plugin
here: GitHub - email-spec/email-spec: Collection of RSpec/MiniTest matchers and Cucumber steps for testing email in a ruby app using ActionMailer or Pony

For testing e-mail.

Aaron Gibralter made some additions as well here:

I made some further changes here:
http://github.com/mischa/email-spec/tree/master

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 “[email protected]
And I fill in “Password” with “monkey”
And I fill in “Password confirmation” with “monkey”
And I press “Sign up”
Then “[email protected]” should receive 1 email
And “[email protected]” should have 1 email
And “[email protected]” 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”

Best,

M

Mischa F. wrote:

Dear all,

Wanted to let people know that Ben M. has an excellent little
plugin here: GitHub - email-spec/email-spec: Collection of RSpec/MiniTest matchers and Cucumber steps for testing email in a ruby app using ActionMailer or Pony
Thanks!

For testing e-mail.

Aaron Gibralter made some additions as well here:
GitHub - agibralter/email-spec: Collection of rspec matchers and cucumber steps for testing email in a rails app

I made some further changes here:
http://github.com/mischa/email-spec/tree/master

Wow, github rocks! I just threw that up there so for Aaron to see since
it was slightly too big for a pastie/gist… And now their are two forks
of it!
I’ll pull from both of you guys now, thanks for sharing.

-Ben

On Thu, Dec 18, 2008 at 5:37 AM, Ben M. [email protected] wrote:

For testing e-mail.
I’ll pull from both of you guys now, thanks for sharing.

I stuck it on the Cucumber tools page:

Thanks!

Aslak