Skip to content

Instantly share code, notes, and snippets.

@JanDintel
Created July 25, 2013 09:13
Show Gist options
  • Save JanDintel/6078108 to your computer and use it in GitHub Desktop.
Save JanDintel/6078108 to your computer and use it in GitHub Desktop.
Factory Girl and Cucumber testing

Factory Girl and Cucumber

Use the outside to inside method. Your features should be abstract and using Factory Girl step definitions forces you to know specific details about the implementation of your application. See: http://robots.thoughtbot.com/post/25650434584/writing-better-cucumber-scenarios-or-why-were So keep in mind, you're testing the logic of the models (methodes, validations..) and controllers with Rspec and the views and 'behavior' of the end user with Cucumber. For some of those best practices, see: http://blog.codeship.io/2013/05/21/testing-tuesday-6-top-5-cucumber-best-practices.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment