Sha256: a516075988dde31706c9d5a38027e3e4a19d9d01ed61fa42fa5f7f91eb1c4a8d

Contents?: true

Size: 792 Bytes

Versions: 74

Compression:

Stored size: 792 Bytes

Contents

require File.dirname(__FILE__) + '/helper'

class TestSugar < Test::Unit::TestCase
  def test_seconds
    assert_equal 1, 1.seconds
    assert_equal 1, 1.second
  end
  
  def test_minutes
    assert_equal 60, 1.minutes
    assert_equal 60, 1.minute
  end
  
  def test_hours
    assert_equal 3600, 1.hours
    assert_equal 3600, 1.hour
  end
  
  def test_days
    assert_equal 86400, 1.days
    assert_equal 86400, 1.day
  end
  
  def test_kilobytes
    assert_equal 1, 1.kilobytes
    assert_equal 1, 1.kilobyte
  end
  
  def test_megabytes
    assert_equal 1024, 1.megabytes
    assert_equal 1024, 1.megabyte
  end
  
  def test_gigabytes
    assert_equal 1024 ** 2, 1.gigabytes
    assert_equal 1024 ** 2, 1.gigabyte
  end
  
  def test_percent
    assert_equal 1, 1.percent
  end
end

Version data entries

74 entries across 74 versions & 22 rubygems

Version Path
dguettler-god-0.7.13.2 test/test_sugar.rb
dguettler-god-0.7.13.3 test/test_sugar.rb
dosire-god-0.7.10 test/test_sugar.rb
dosire-god-0.7.12 test/test_sugar.rb
dosire-god-0.7.9 test/test_sugar.rb
dunedain289-god-0.7.12.1 test/test_sugar.rb
dustin-god-0.7.7.1 test/test_sugar.rb
eric-god-0.7.10 test/test_sugar.rb
eric-god-0.7.11 test/test_sugar.rb
eric-god-0.7.12 test/test_sugar.rb
eric-god-0.7.14 test/test_sugar.rb
eric-god-0.7.7 test/test_sugar.rb
fotonauts-god-0.7.10 test/test_sugar.rb
fotonauts-god-0.7.12 test/test_sugar.rb
gohanlonllc-god-0.7.9 test/test_sugar.rb
gordoncww-god-0.7.11.1 test/test_sugar.rb
jreynolds-god-0.7.13 test/test_sugar.rb
jwilkins-god-0.7.9 test/test_sugar.rb
mathieuravaux-god-0.7.11 test/test_sugar.rb
mojombo-god-0.7.10 test/test_sugar.rb