README.rdoc in pickle-0.3.5 vs README.rdoc in pickle-0.4.0
- old
+ new
@@ -1,11 +1,11 @@
= pickle
Pickle gives you cucumber steps that create your models easily from factory-girl or
machinist factories/blueprints. You can also just use ActiveRecord as a factory but it's not as cool.
-Pickle can make use of different ORMs for finding records. Currently ActiveRecord and DataMapper adapters are
+Pickle can make use of different ORMs for finding records. Currently ActiveRecord, DataMapper, MongoID adapters are
provided. More adapters welcome!
References to the models are stored in the current world, not necessarily for the purpose of checking the db
(although you could use it for that), but for enabling easy reference to urls, and for
building complex givens which require a bunch of models collaborating
@@ -70,15 +70,15 @@
If you want path steps and email steps then just add the 'paths' and/or 'email' options to the generator.
The code/steps will be written to <tt>features/env/paths.rb</tt> and
<tt>features/step_definitions/email_steps.rb</tt> respectively.
-=== Using with plain ole Active Record or DataMapper
+=== Using with plain ole Active Record, DataMapper or Mongoid
-Pickle comes with adapters for Active Record and DataMapper.
+Pickle comes with adapters for Active Record, DataMapper and Mongoid.
-If you have an AR/DM called 'Post', with required fields 'title', and 'body', then you can now write
+If you have a model called 'Post', with required fields 'title', and 'body', then you can now write
steps like this
Given a post exists with title: "My Post", body: "My body"
=== Using with factory-girl or machinist
@@ -116,11 +116,11 @@
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
The Active Record and DataMapper ones can be found at
-ActiveRecord::Base::PickleAdapter and DataMapper::Resource::PickleAdapter respectively.
+ActiveRecord::Base::PickleAdapter, DataMapper::Resource::PickleAdapter, Mongoid::Document::PickleAdapter respectively.
See how to implement one by looking at the ones provided in the pickle source in lib/pickle/adapters/*
=== Configuring Pickle
@@ -131,17 +131,15 @@
In: <tt>features/support/pickle.rb</tt>
require 'pickle/world'
Pickle.configure do |config|
- config.adapters = [:machinist, YourOwnAdapterClass]
+ config.adapters = [:machinist, :active_record, YourOwnAdapterClass]
config.map 'me', 'myself', 'my', 'I', :to => 'user: "me"'
end
-Out of the box pickle looks for machinist, then factory-girl, then finally active-record 'factories'.
-If you find that your steps aren't working with your factories, it's probably the case that your factory
-setup is not being included in your cucumber environment (see comments above regarding machinist and factory-girl).
+Out of the box pickle looks for machinist, then factory-girl. If you want to use active-record 'factories' you should add ":active_record" to adapters. If you find that your steps aren't working with your factories, it's probably the case that your factory setup is not being included in your cucumber environment (see comments above regarding machinist and factory-girl).
== API
=== Steps
@@ -330,10 +328,11 @@
== Contributors
The following people have made Pickle better:
+* {Sebastian Zuchmanski}[http://github.com/sebcioz]
* {Paul Gideon Dann}[http://github.com/giddie]
* {Tom Meier}[http://github.com/tommeier]
* {Sean Hussey}[http://github.com/seanhussey]
* Brian Rose & Kevin Olsen
* {Christopher Darroch}[http://github.com/chrisdarroch]
@@ -345,6 +344,6 @@
* {Tobi Knaup}[http://github.com/guenter]
* {Michael MacDonald}[http://github.com/schlick]
* {Michael Moen}[http://github.com/UnderpantsGnome]
* {Myron Marston}[http://github.com/myronmarston]
* {Stephan Hagemann}[http://github.com/xing]
-* {Chris Flipse}[http://github.com/cflipse]
\ No newline at end of file
+* {Chris Flipse}[http://github.com/cflipse]