From 72854a2be02662c716cce12d691c9d6489cb664c Mon Sep 17 00:00:00 2001 From: Michael Moen Date: Thu, 25 Feb 2010 14:55:53 -0600 Subject: [PATCH] add email steps to README --- README.rdoc | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/README.rdoc b/README.rdoc index 4a3fbbce..e70b3b24 100644 --- a/README.rdoc +++ b/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 script/generate pickle email 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 [I|they] follow [text_or_regex|the first link] 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 n email(s) should be delivered to address, e.g. + + Then 1 email should be delivered to joe@example.com + +Then n email(s) should be delivered with fields, 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 fields should be delivered to address, e.g. + + Then subject: "Welcome to pickle" should be delivered to joe@example.com + +Then fields should be not delivered to address, e.g. + + Then subject: "Welcome to pickle" should not be delivered to pickle@example.com + +Then email should have fields, e.g. + + Then the email should have subject: "Welcome to pickle", from: "pickle@example.com" + +Then email should contain "text", e.g. + + Then the email should contain "Thank you for choosing pickle" + +Then email should not contain "text", e.g. + + Then the email should not contain "v1@gr@" + +Then email should link to "href", 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] +