Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # in spec/factories/movie.rb
- FactoryGirl.define do
- factory :movie do
- title 'A Fake Title' # default values
- rating 'PG'
- release_date { 10.years.ago }
- end
- end
- # in your specs
- it 'should include rating and year' do
- movie = FactoryGirl.build(:movie, :title => 'Milk')
- # etc.
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement