diff options
| author | mo khan <mo@mokhan.ca> | 2015-05-19 07:55:04 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-05-21 21:26:10 -0600 |
| commit | e89bc7cb1467063ce65e3e78d77c8f4635132d0f (patch) | |
| tree | 4e7664935ebe396ac0b048e0421e15a034f15b61 /spec/support | |
| parent | b769c085489679d362ccacd4e5d514f663379089 (diff) | |
create a workout record for each recors in the sqlite db.
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/stronglifts_program.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/stronglifts_program.rb b/spec/support/stronglifts_program.rb new file mode 100644 index 0000000..1854d7d --- /dev/null +++ b/spec/support/stronglifts_program.rb @@ -0,0 +1,12 @@ +shared_context "stronglifts_program" do + let!(:program) { Program.create!(name: "StrongLifts 5×5") } + let!(:squat) { Exercise.new(name: "Squat") } + let!(:workout_a) { program.workouts.create name: "A" } + let!(:squat_workout) { workout_a.add_exercise(squat, sets: 5, repetitions: 5) } + let!(:bench_workout) { workout_a.add_exercise(Exercise.new(name: "Bench Press"), sets: 5, repetitions: 5) } + let!(:row_workout) { workout_a.add_exercise(Exercise.new(name: "Barbell Row"), sets: 5, repetitions: 5) } + let!(:workout_b) { program.workouts.create name: "B" } + let!(:squat_workout_b) { workout_b.add_exercise(squat, sets: 5, repetitions: 5) } + let!(:overhead_press_workout) { workout_b.add_exercise(Exercise.new(name: "Overhead Press"), sets: 5, repetitions: 5) } + let!(:deadlift_workout) { workout_b.add_exercise(Exercise.new(name: "Deadlift"), sets: 1, repetitions: 5) } +end |
