summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/ActivitySummary_spec.rb2
-rw-r--r--spec/spec_helper.rb10
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/ActivitySummary_spec.rb b/spec/ActivitySummary_spec.rb
index 4e92017..20bbd3d 100644
--- a/spec/ActivitySummary_spec.rb
+++ b/spec/ActivitySummary_spec.rb
@@ -21,7 +21,7 @@ describe PostRunner::ActivitySummary do
end
it 'should create a metric summary' do
- @as.to_s #TODO: Fix aggregation first
+ puts @as.to_s #TODO: Fix aggregation first
end
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index cd6fec4..1bd2c43 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -8,7 +8,7 @@ def create_fit_activity(date, duration_minutes)
a.total_timer_time = duration_minutes * 60
a.new_user_profile({ :timestamp => ts,
:age => 33, :height => 1.78, :weight => 73.0,
- :gender => 'male', :activity_class => 4.0,
+ :gender => 'male', :activity_class => 7.0,
:max_hr => 178 })
a.new_event({ :timestamp => ts, :event => 'timer',
@@ -22,9 +22,9 @@ def create_fit_activity(date, duration_minutes)
:position_lat => 51.5512 - mins * 0.0008,
:position_long => 11.647 + mins * 0.002,
:distance => 200.0 * mins,
- :altitude => 100 + mins * 0.5,
+ :altitude => 100 + mins * 3,
:speed => 3.1,
- :vertical_oscillation => 9 + mins * 0.02,
+ :vertical_oscillation => 90 + mins * 0.2,
:stance_time => 235.0 * mins * 0.01,
:stance_time_percent => 32.0,
:heart_rate => 140 + mins,
@@ -33,10 +33,10 @@ def create_fit_activity(date, duration_minutes)
:fractional_cadence => (mins % 2) / 2.0
})
- ts += 60
- if (mins + 1) % 5 == 0
+ if mins > 0 && mins % 5 == 0
a.new_lap({ :timestamp => ts })
end
+ ts += 60
end
a.new_session({ :timestamp => ts })
a.new_event({ :timestamp => ts, :event => 'recovery_time',