summaryrefslogtreecommitdiffstats
path: root/test/utility_test.rb
blob: adc55b6596c30ebe30a379931dc7ea19d2b07d65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'test_helper'

class UtilityTest < HCl::TestCase
  include HCl::Utility

  def test_time2float_decimal
    assert_equal 2.5, time2float("2.5")
  end

  def test_time2float_hhmm
    assert_equal 2.5, time2float("2:30")
  end

  def test_time2float_assume_decimal
    assert_equal 2.0, time2float("2")
  end
end