require_relative './test_helper' describe Numeric do it '#amperes' do a = 0.5.amperes a.must_be_kind_of Struct a.must_be_instance_of Ampere a.must_equal Ampere.new(0.5) end it '#ohms' do o = 18.ohms o.must_be_kind_of Struct o.must_be_instance_of Ohm o.must_equal Ohm.new(18.0) end it '#volts' do v = 9.volts v.must_be_kind_of Struct v.must_be_instance_of Volt v.must_equal Volt.new(9.0) end end