Permalink
Browse files

Merge pull request #137 from mattwynne/master

Fix docs for #136
  • Loading branch information...
2 parents 5e2551a + 3283834 commit 9952a3fd72c5a53969cac72e4d100f6817807b46 @bmabey bmabey committed Aug 7, 2012
Showing with 3 additions and 7 deletions.
  1. +3 −7 README.textile
View
@@ -149,7 +149,9 @@ end
h3. Cucumber Example
-Add this to your features/support/env.rb file:
+If you're using Cucumber with Rails, just use the generator that ships with cucumber-rails, and that will create all the code you need to integrate DatabaseCleaner into your Rails project.
+
+Otherwise, to add DatabaseCleaner to your project by hand, create a file features/support/database_cleaner.rb that looks like this:
<pre>
begin
@@ -159,13 +161,7 @@ begin
rescue NameError
raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
end
-</pre>
-
-A good idea is to create the before and after hooks to use the DatabaseCleaner.start and DatabaseCleaner.clean methods.
-Inside features/support/hooks.rb:
-
-<pre>
Before do
DatabaseCleaner.start
end

0 comments on commit 9952a3f

Please sign in to comment.