triathlon 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/lib/splits.rb CHANGED
@@ -12,7 +12,11 @@ class SplitPresenter
12
12
 
13
13
  minutes = (@total_seconds / 60.0).truncate
14
14
  seconds = (@total_seconds - (minutes * 60.0)).round
15
- return "#{minutes}:#{seconds}"
15
+ seconds_string = seconds.to_s
16
+ if seconds < 10
17
+ seconds_string = "0#{seconds_string}"
18
+ end
19
+ return "#{minutes}:#{seconds_string}"
16
20
  end
17
21
 
18
22
  end
data/lib/triathlon.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Triathlon
2
- VERSION = "0.0.3".freeze
2
+ VERSION = "0.0.5".freeze
3
3
  end
4
4
 
5
5
  require 'bike'
@@ -30,4 +30,9 @@ class TestSplits < Test::Unit::TestCase
30
30
  splits = Splits.new("7:15")
31
31
  assert_equal splits.pace.to_s, "7:15"
32
32
  end
33
+
34
+ should 'present time with seconds less than ten correctly' do
35
+ splits = Splits.new("6:16")
36
+ assert_equal splits.get_eight_hundred.to_s, "3:08"
37
+ end
33
38
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: triathlon
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Waylon Calabrese
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-29 00:00:00 -05:00
18
+ date: 2010-08-31 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies: []
21
21