Skip to content

Instantly share code, notes, and snippets.

@schlick
Created November 3, 2009 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save schlick/224945 to your computer and use it in GitHub Desktop.
Save schlick/224945 to your computer and use it in GitHub Desktop.
A cucumber step definition for destroying all objects using pickle
# destroy all objects
Given(/^no #{capture_plural_factory} exist$/) do |plural_factory|
plural_factory.classify.constantize.destroy_all
# you could add the following to verify that there are indeed no records
find_models(plural_factory.singularize).should be_nil
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment