Skip to content

Commit

Permalink
Document rails 3 vs rails 2 usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Jul 31, 2010
1 parent e4b97b8 commit 9104423
Showing 1 changed file with 59 additions and 43 deletions.
102 changes: 59 additions & 43 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,76 +10,66 @@ References to the models are stored in the current world, not necessarily for th
(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

== Resources
== Quickstart

<b>Github</b> for code: http://github.com/ianwhite/pickle
This is a quickstart guide for rails apps. Firstly, install {cucumber-rails}[http://github.com/aslakhellesoy/cucumber-rails], and its dependencies.
Then do the following:

<b>Gemcutter</b> for the gem: http://gemcutter.org/gems/pickle
=== Rails 3:

<b>Rdoc.info</b> for docs: http://rdoc.info/projects/ianwhite/pickle
Add the gem to your Gemfile:

<b>Google group</b> for questions: http://groups.google.com/group/pickle-cucumber
gem 'pickle'

Then install with:

<b>Lighthouse</b> for bugs: http://ianwhite.lighthouseapp.com/projects/25941-pickle
bundle install

Discover the options for the generator:

<b>Railscast</b> presentation: http://railscasts.com/episodes/186-pickle-with-cucumber
rails g pickle --help

<b>Blog articles</b>: {dynamic50: Integration testing with cucumber and pickle}[http://blog.dynamic50.com/index.php/2009/04/integration-testing-with-cucumber-and-pickle/], {rubyflare: pickle my cucumber}[http://rubyflare.com/2009/10/28/pickle-my-cucumber/]
Run the generator, e.g:

== Install
rails g pickle --paths --email

=== For Rails 2:

Install pickle either as a rails plugin, or a gem
Add the following to config/environments/cucumber:

# gem from gemcutter
sudo gem install pickle

# gem dependency (in config/environments/cucumber.rb)
config.gem 'pickle'

# plugin
script/plugin install git://github.com/ianwhite/pickle.git

# or, plugin as submodule
git submodule add git://github.com/ianwhite/pickle.git vendor/plugins/pickle
Install the gem with

== CI
rake gems:install RAILS_ENV=cucumber

Run the generator with:

It's tested against all stable branches of 2.x rails, and edge, with the latest versions of rspec, cucumber, factory_girl, machinist.

== Run the tests
script/generate pickle [paths] [email]

To run the specs do:
== Resources

rake spec
<b>Github</b> for code: http://github.com/ianwhite/pickle

To run the features (rails 2.3 only ATM):
<b>Gemcutter</b> for the gem: http://gemcutter.org/gems/pickle

rake cucumber
<b>Rdoc.info</b> for docs: http://rdoc.info/projects/ianwhite/pickle

== Contributors
<b>Google group</b> for questions: http://groups.google.com/group/pickle-cucumber

The following people have made Pickle better:
<b>Lighthouse</b> for bugs: http://ianwhite.lighthouseapp.com/projects/25941-pickle

* {Daniel Neighman}[http://github.com/hassox]
* {Josh Bassett}[http://github.com/nullobject]
* {Nick Rutherford}[http://github.com/nruth]
* {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]
<b>Railscast</b> presentation: http://railscasts.com/episodes/186-pickle-with-cucumber

== Get Started
<b>Blog articles</b>: {dynamic50: Integration testing with cucumber and pickle}[http://blog.dynamic50.com/index.php/2009/04/integration-testing-with-cucumber-and-pickle/], {rubyflare: pickle my cucumber}[http://rubyflare.com/2009/10/28/pickle-my-cucumber/]

(you'd better install cucumber)

script/generate pickle [paths] [email]
== Using Pickle

Now have a look at <tt>features/step_definitions/pickle_steps.rb</tt>

If you want path steps and email steps then just add 'paths' and/or 'email'. The code/steps will be
written to <tt>features/env/paths.rb</tt> and
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
Expand Down Expand Up @@ -297,3 +287,29 @@ can build up composite objects with ease
# example of use
Given a user exists
And a post exists with author: the user # this step will assign the above user as :author on the post

== Run the tests

To run the specs do:

rake spec

To run the features (rails 2.3 only ATM):

rake cucumber

== Contributors

The following people have made Pickle better:

* {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]
* {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]

0 comments on commit 9104423

Please sign in to comment.