Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add email steps to README

  • Loading branch information...
commit 72854a2be02662c716cce12d691c9d6489cb664c 1 parent 40dc3b3
@UnderpantsGnome UnderpantsGnome authored committed
Showing with 66 additions and 0 deletions.
  1. +66 −0 README.rdoc
View
66 README.rdoc
@@ -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:
@@ -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]
+
Please sign in to comment.
Something went wrong with that request. Please try again.