* make 'two-instrument' user
This commit is contained in:
parent
7816007361
commit
e1d20949f5
|
|
@ -28,6 +28,12 @@ FactoryGirl.define do
|
|||
user.musician_instruments << FactoryGirl.build(:musician_instrument, user: user)
|
||||
end
|
||||
|
||||
factory :user_two_instruments do
|
||||
before(:create) do |user|
|
||||
user.musician_instruments << FactoryGirl.create(:musician_instrument, user: user, instrument: Instrument.find('drums'), proficiency_level: 2, priority:1 )
|
||||
end
|
||||
end
|
||||
|
||||
factory :single_user_session do
|
||||
after(:create) do |user, evaluator|
|
||||
music_session = FactoryGirl.create(:music_session, :creator => user)
|
||||
|
|
|
|||
|
|
@ -3,13 +3,7 @@ require 'spec_helper'
|
|||
describe "Feed", :js => true, :type => :feature, :capybara_feature => true do
|
||||
|
||||
|
||||
let (:user) {
|
||||
u = FactoryGirl.create(:user)
|
||||
inst2 = FactoryGirl.create(:musician_instrument, user: u, instrument: Instrument.find('drums'), proficiency_level: 2, priority:1)
|
||||
u.musician_instruments << inst2
|
||||
u.save!
|
||||
u
|
||||
}
|
||||
let (:user) { FactoryGirl.create(:user_two_instruments) }
|
||||
|
||||
before(:each) do
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue