diff options
| author | mo khan <mo@mokhan.ca> | 2016-07-04 11:10:08 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2016-07-04 11:10:08 -0600 |
| commit | 50b7aee2c9bdc08e6025759dd17d802da3c9bd45 (patch) | |
| tree | f8b6dae35da9312046fb496cd53d7c0356da8119 /spec | |
| parent | bca4cc4733f6269242207deac83b5a378ac07750 (diff) | |
fix broken tests.
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/models/workout_spec.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/models/workout_spec.rb b/spec/models/workout_spec.rb index 4e78d57..6160b43 100644 --- a/spec/models/workout_spec.rb +++ b/spec/models/workout_spec.rb @@ -18,10 +18,11 @@ describe Workout, type: :model do expect(result).to be_persisted expect(result.exercise).to eql(squat) expect(subject.progress_for(squat).to_sets).to eql([5]) - expect(subject.sets.at(0).exercise).to eql(squat) - expect(subject.sets.at(0).target_weight).to eql(target_weight.to_f) - expect(subject.sets.at(0).target_repetitions).to eql(5) - expect(subject.sets.at(0).actual_repetitions).to eql(5) + sets = subject.sets.to_a + expect(sets.at(0).exercise).to eql(squat) + expect(sets.at(0).target_weight).to eql(target_weight.to_f) + expect(sets.at(0).target_repetitions).to eql(5) + expect(sets.at(0).actual_repetitions).to eql(5) end it "records the next set" do |
