Skip to content

Commit

Permalink
add email steps to README
Browse files Browse the repository at this point in the history
  • Loading branch information
UnderpantsGnome authored and ianwhite committed Mar 14, 2011
1 parent 40dc3b3 commit 72854a2
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions README.rdoc
Expand Up @@ -329,6 +329,71 @@ can build up composite objects with ease
Given a user exists
And a post exists with author: the user # this step will assign the above user as :author on the post

=== Email Steps

When you run <tt>script/generate pickle email</tt> you get the following steps

In the following steps "the email" can be any of the following

the email
email to: "joe@example.com"
email subject: "some subject"
email to: "joe@example.com", subject: "some subject"

==== Given steps

Clear the email queue, e.g.

Given all email has been delivered
Given all emails have been delivered

==== When steps

When <b>[I|they]</b> follow <b>[text_or_regex|the first link]</b> the email, e.g.

When I follow the first link in the email
When I follow "http://example.com/pickle" in the email
When I follow "some link text" in the email

==== Then steps

Then <b>n</b> email(s) should be delivered to <b>address</b>, e.g.

Then 1 email should be delivered to joe@example.com

Then <b>n</b> email(s) should be delivered with <b>fields</b>, e.g.

Then 2 emails should be delivered with subject: "Welcome to pickle"
Then 2 email should be delivered with to: "joe@example.com", from: "pickle@example.com"

Then <b>fields</b> should be delivered to <b>address</b>, e.g.

Then subject: "Welcome to pickle" should be delivered to joe@example.com

Then <b>fields</b> should be not delivered to <b>address</b>, e.g.

Then subject: "Welcome to pickle" should not be delivered to pickle@example.com

Then <b>email</b> should have <b>fields</b>, e.g.

Then the email should have subject: "Welcome to pickle", from: "pickle@example.com"

Then <b>email</b> should contain "<b>text</b>", e.g.

Then the email should contain "Thank you for choosing pickle"

Then <b>email</b> should not contain "<b>text</b>", e.g.

Then the email should not contain "v1@gr@"

Then <b>email</b> should link to "<b>href</a>", e.g.

Then the email should link to http://example.com/pickle

Then show me the email(s), will open the email(s) in your browser (depends on OS X)

Then show me the email(s)

== Run the tests

To run the specs and features, you can start from the last known good set of gem dependencies in Gemfile.lock.development:
Expand Down Expand Up @@ -367,3 +432,4 @@ The following people have made Pickle better:
* {Myron Marston}[http://github.com/myronmarston]
* {Stephan Hagemann}[http://github.com/xing]
* {Chris Flipse}[http://github.com/cflipse]

0 comments on commit 72854a2

Please sign in to comment.