Sha256: eaf2af32cf573f13e9ecc5f2bd6bea1b5aa435a5503c259eabd144e4dea8965b
Contents?: true
Size: 763 Bytes
Versions: 2
Compression:
Stored size: 763 Bytes
Contents
require 'test/unit' require 'test/framework' require 'eymiha/units' class TC_system_create < Test::Unit::TestCase include 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
eymiha_units-1.0.0 | test/tc_system_create.rb |
eymiha_units-1.0.1 | test/tc_system_create.rb |