Last active
December 27, 2015 00:18
-
-
Save wojtekmach/7236318 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
require 'factory_girl' | |
class Article < Struct.new :headline | |
end | |
FactoryGirl.define do | |
factory :article do | |
headline "my headline" | |
end | |
end | |
describe Article do | |
it do | |
article = FactoryGirl.build :article | |
article.headline.upcase! | |
article.headline.should == 'MY HEADLINE' | |
end | |
it do | |
article = FactoryGirl.build :article | |
article.headline.should == 'my headline' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment