Created
November 3, 2009 10:51
-
-
Save schlick/224945 to your computer and use it in GitHub Desktop.
A cucumber step definition for destroying all objects using pickle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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