README.rdoc in pickle-0.3.1 vs README.rdoc in pickle-0.3.2
- old
+ new
@@ -91,15 +91,12 @@
# later
Then a user should exist with name: "Fred"
And that user should be activated # this uses rspec predicate matchers
-==== Machinst: require your blueprints and reset Shams
+==== Machinist: require your blueprints and reset Shams
-(The latest version of pickle supports {multiple blueprints}[http://github.com/notahat/machinist/commit/d6492e6927a8aa1819926e48b22377171fd20496], for
-earlier versions of machinist use pickle <= 0.1.10)
-
In your <tt>features/support/env.rb</tt> add the following lines at the bottom
require "#{Rails.root}/spec/blueprints" # or wherever they live
Before { Sham.reset } # reset Shams in between scenarios
@@ -112,11 +109,11 @@
# example features/support/factory_girl.rb
require File.dirname(__FILE__) + '/../../spec/factories'
=== Using with an ORM other than ActiveRecord or DataMapper
-Pickle can be used with any Modeling library provided there is an adapter written for it.
+Pickle can be used with any modelling library provided there is an adapter written for it.
Adapters are very simple and exist a module or class with the name "PickleAdapter" available to the class. For example
User.const_get(:PickleAdapter) #=> should return a pickle adapter
@@ -185,10 +182,39 @@
Given the following users exist
| name | activated |
| Fred | false |
| Ethel | true |
+===== Named machinist blueprints
+
+"Given <b> a <i>named</i> model</b> exists with <b>fields</b>"
+
+The latest version of pickle supports {named machinist blueprints}[http://github.com/notahat/machinist/commit/d6492e6927a8aa1819926e48b22377171fd20496].
+
+If you had the following blueprints:
+
+ User.blueprint do
+ name
+ email
+ end
+
+ User.blueprint(:super_admin) do
+ role { "admin" }
+ end
+
+ User.blueprint(:activated) do
+ activated { true }
+ end
+
+You could create a user with pickle by simply adding the name of the blueprint before the model:
+
+ Given a super admin user exists
+ And an activated user exists with name: "Fred"
+
+This is much nicer than having to set up common configurations in your steps all the time, and far more readable to boot.
+
+
==== Then steps
===== Asserting existence of models
"Then <b>a model</b> should exist", e.g.
@@ -300,9 +326,11 @@
== Contributors
The following people have made Pickle better:
+* Brian Rose & Kevin Olsen
+* {Christopher Darroch}[http://github.com/chrisdarroch]
* {Szymon Nowak}[http://github.com/szimek]
* {H.J. Blok}[http://github.com/hjblok]
* {Daniel Neighman}[http://github.com/hassox]
* {Josh Bassett}[http://github.com/nullobject]
* {Nick Rutherford}[http://github.com/nruth]
\ No newline at end of file