Commit a37feb9
Changed files (2)
spec
models
spec/models/user_spec.rb
@@ -245,7 +245,7 @@ describe User do
end
it "prepares the correct number of sets" do
- squat = create(:exercise)
+ squat = create(:squat)
routine.add_exercise(squat, sets: 3)
workout = subject.next_workout_for(routine)
expect(workout.exercise_sets.length).to eql(3)
spec/factories.rb
@@ -1,6 +1,9 @@
FactoryGirl.define do
factory :exercise do
name { FFaker::Internet.user_name }
+ factory :squat do
+ name 'Squat'
+ end
end
factory :exercise_set do
association :exercise