Use factory_girl_rails for factories
This commit is contained in:
@@ -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 }
|
||||
|
@@ -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 }
|
||||
|
Reference in New Issue
Block a user