Created
June 5, 2012 06:52
-
-
Save chintanparikh/2873166 to your computer and use it in GitHub Desktop.
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
--------------------- post_steps.rb (Using this with Cucumber) -------------------- | |
Given /^there is a post called "(.*?)"$/ do |title| | |
FactoryGirl.create(:post, :title => title) | |
end | |
--------------------- factories/post_factory.rb ----------------------------- | |
FactoryGirl.define do | |
factory :post do | |
title 'Hello, World' | |
content 'Hello world! This is a blog post' | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment