spec/support/factory.rb in restpack_serializer-0.4.2 vs spec/support/factory.rb in restpack_serializer-0.4.3

- old
+ new

@@ -1,9 +1,9 @@ require 'factory_girl' FactoryGirl.define do - factory :artist do + factory :artist, :class => MyApp::Artist do sequence(:name) {|n| "Artist ##{n}" } sequence(:website) {|n| "http://website#{n}.com/" } factory :artist_with_albums do ignore do @@ -14,11 +14,11 @@ create_list(:album_with_songs, evaluator.album_count, artist: artist) end end end - factory :album do + factory :album, :class => MyApp::Album do sequence(:title) {|n| "Album ##{n}" } sequence(:year) {|n| 1960 + n } artist factory :album_with_songs do @@ -30,16 +30,16 @@ create_list(:song, evaluator.song_count, album: album, artist: album.artist) end end end - factory :song do + factory :song, :class => MyApp::Song do sequence(:title) {|n| "Song ##{n}" } artist album end - factory :payment do + factory :payment, :class => MyApp::Payment do amount 999 artist end -end \ No newline at end of file +end