schlick (owner)

Forks

Revisions

gist: 224945 Download_button fork
public
Description:
A cucumber step definition for destroying all objects using pickle
Public Clone URL: git://gist.github.com/224945.git
Embed All Files: show embed
pickle_extra_steps.rb #
1
2
3
4
5
6
# 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