1 require File.dirname(__FILE__) + '/helper'
3 class TestSugar < Test::Unit::TestCase
5 assert_equal 1, 1.seconds
6 assert_equal 1, 1.second
10 assert_equal 60, 1.minutes
11 assert_equal 60, 1.minute
15 assert_equal 3600, 1.hours
16 assert_equal 3600, 1.hour
20 assert_equal 86400, 1.days
21 assert_equal 86400, 1.day
25 assert_equal 1, 1.kilobytes
26 assert_equal 1, 1.kilobyte
30 assert_equal 1024, 1.megabytes
31 assert_equal 1024, 1.megabyte
35 assert_equal 1024 ** 2, 1.gigabytes
36 assert_equal 1024 ** 2, 1.gigabyte
40 assert_equal 1, 1.percent