Use factory_girl_rails for factories

This commit is contained in:
Thibault Jouan
2011-07-25 22:08:45 +00:00
parent 6af96b0f75
commit 47fa969617
8 changed files with 35 additions and 35 deletions

View File

@@ -2,7 +2,7 @@ require 'spec_helper'
describe Playlist do
subject { playlist }
let(:playlist) { Playlist.new :name => 'Electro' }
let(:playlist) { FactoryGirl.build(:playlist) }
context 'with valid attributes' do
it { should be_valid }

View File

@@ -2,7 +2,7 @@ require 'spec_helper'
describe Track do
subject { track }
let(:track) { Track.new :name => 'Mega song' }
let(:track) { FactoryGirl.build(:track) }
context 'with valid attributes' do
it { should be_valid }