diff options
| author | Zack Hobson | 2014-04-21 15:31:23 -0700 | 
|---|---|---|
| committer | Zack Hobson | 2014-04-21 15:44:03 -0700 | 
| commit | d3a47641290396abeb5ccb2964350a6f5a4ddb86 (patch) | |
| tree | deeadcdbe3faa3cf86a2aab209b40ad073db9774 /test/utility_test.rb | |
| parent | e0ade5d3b92734cebb86336077664b524a606984 (diff) | |
| download | hcl-d3a47641290396abeb5ccb2964350a6f5a4ddb86.tar.bz2 | |
coverage game
Diffstat (limited to 'test/utility_test.rb')
| -rw-r--r-- | test/utility_test.rb | 21 | 
1 files changed, 21 insertions, 0 deletions
diff --git a/test/utility_test.rb b/test/utility_test.rb index adc55b6..b0fb09c 100644 --- a/test/utility_test.rb +++ b/test/utility_test.rb @@ -3,6 +3,27 @@ require 'test_helper'  class UtilityTest < HCl::TestCase    include HCl::Utility +  def test_get_task_ids +    @settings = {'task.taco'=>'123 456'} +    assert_equal ['123', '456'], get_task_ids('taco', []) +  end + +  def test_get_ident_with_symbol +    assert_equal 'taco', get_ident(%w[ +:25 @taco makin tacos ]) +  end + +  def test_get_ident_without_symbol +    assert_equal 'burrito', get_ident(%w[ burrito +:32 makin burritos ]) +  end + +  def test_get_starting_time_minutes +    assert_equal 0.25, get_starting_time(%w[ @taco +:15 makin tacos ]) +  end + +  def test_get_starting_time_decimal +    assert_equal 0.25, get_starting_time(%w[ @taco +.25 makin tacos ]) +  end +    def test_time2float_decimal      assert_equal 2.5, time2float("2.5")    end  | 
