Sha256: 09b094757e03d914735b759cb976c0da8eaa11cafd4d534ae84e0f0008d375cc
Contents?: true
Size: 760 Bytes
Versions: 1
Compression:
Stored size: 760 Bytes
Contents
require 'test/unit' require 'test/framework' require 'units' class TC_system_create < Test::Unit::TestCase understands UnitsTest def test_system_create Units.create :length do |m| m.system 'english' m.system 'metric' end english = Units.length.english metric = Units.length.metric assert(english.kind_of?(UnitsSystem)) assert(metric.kind_of?(UnitsSystem)) assert(english.name == 'english') assert(metric.name == 'metric') assert(english.units_measure == Units.length) assert(metric.units_measure == Units.length) assert(Units.length.keys.index('english') != nil) assert(Units.length.keys.index('metric') != nil) assert(Units.length.keys.index('foo') == nil) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
eymiha_units-0.1.0 | test/tc_system_create.rb |