Update factory girl to last version
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user