Commit 81fa217
Changed files (3)
db
spec
db/seeds.rb
@@ -14,13 +14,15 @@ routine_a.add_exercise(bench_press, sets: 5, repetitions: 5)
routine_a.add_exercise(barbell_row, sets: 5, repetitions: 5)
routine_a.add_exercise(dips, sets: 3, repetitions: 5)
routine_a.add_exercise(paused_bench_press, sets: 3, repetitions: 5)
-#routine_a.add_exercise(planks, sets: 3, time: 60.seconds)
+routine_a.add_exercise(planks, sets: 3, duration: 60.seconds)
overhead_press = Exercise.find_or_create_by!(name: "Overhead Press")
deadlift = Exercise.find_or_create_by!(name: "Deadlift")
chin_ups = Exercise.find_or_create_by!(name: "Chinups")
pull_ups = Exercise.find_or_create_by!(name: "Pull Ups")
-close_grip_bench_press = Exercise.find_or_create_by!(name: "Close Grip Bench Press")
+close_grip_bench_press = Exercise.find_or_create_by!(
+ name: "Close Grip Bench Press"
+)
routine_b = program.routines.find_or_create_by(name: "B")
routine_b.add_exercise(squat, sets: 5, repetitions: 5)
spec/models/exercise_set_spec.rb
@@ -32,13 +32,13 @@ describe ExerciseSet do
end
describe "#target_weight" do
- it 'saves lbs' do
+ it "saves lbs" do
subject.target_weight = 45.lbs
subject.save!
expect(subject.reload.target_weight).to eql(45.lbs)
end
- it 'saves kgs' do
+ it "saves kgs" do
subject.target_weight = 20.kg
subject.save!
expect(subject.reload.target_weight).to eql(20.kg)
spec/models/routine_spec.rb
@@ -34,7 +34,7 @@ describe Routine do
expect(subject.recommendations.count).to eql(1)
end
- it 'adds a timed exercise' do
+ it "adds a timed exercise" do
subject.add_exercise(exercise, sets: 3, duration: 60.seconds)
expect(subject.exercises).to match_array([exercise])
expect(subject.recommendations.count).to eql(1)