Update factory girl to last version

This commit is contained in:
Thibault Jouan
2014-04-01 05:04:27 +00:00
parent d2b332215e
commit eda2f3fbee
28 changed files with 56 additions and 56 deletions

View File

@@ -2,8 +2,8 @@ require 'spec_helper'
describe Track do
subject { track }
let(:track) { Factory.build(:track) }
let(:file) { Factory.attributes_for(:track_with_sound)[:file] }
let(:track) { FactoryGirl.build(:track) }
let(:file) { FactoryGirl.attributes_for(:track_with_sound)[:file] }
it { should be_valid }
it { should have_many :sounds }
@@ -34,7 +34,7 @@ describe Track do
describe '#sound' do
context 'with a sound' do
before do
track.sounds << Factory.create(:sound)
track.sounds << FactoryGirl.create(:sound)
end
it 'returns a sound' do
@@ -52,7 +52,7 @@ describe Track do
context 'with a sound' do
before do
track.sounds << Factory.create(:sound)
track.sounds << FactoryGirl.create(:sound)
end
it 'returns true' do
@@ -63,8 +63,8 @@ describe Track do
describe '.latest' do
it 'returns latest tracks in descending creation date order' do
track1 = Factory.create(:track, :created_at => '2011-07-27 19:13:42')
track2 = Factory.create(:track, :created_at => '2011-07-27 19:58:57')
track1 = FactoryGirl.create(:track, :created_at => '2011-07-27 19:13:42')
track2 = FactoryGirl.create(:track, :created_at => '2011-07-27 19:58:57')
Track.latest.should == [track2, track1]
end
end