Sha256: 82ff8b9ec6161954b25414cfde7dd6a44570c52f2eb62833c27c0b6b93366513
Contents?: true
Size: 596 Bytes
Versions: 1
Compression:
Stored size: 596 Bytes
Contents
require_relative './test_helper' describe Variable do before { @variable = Variable.new(1.0) } it '#initialize' do @variable.must_be_kind_of Struct @variable.must_be_instance_of Variable end it '#value' do @variable.value.must_equal 1.0 end it '#to_s' do @variable.to_s.must_equal '1.0 variables' end it '#inspect' do @variable.inspect.must_equal '1.0 variables' end it '#and' do 0.5.amperes.and(18.ohms).must_equal Volt.new(9.0) 18.ohms.and(9.volts).must_equal Ampere.new(0.5) 9.volts.and(0.5.amperes).must_equal Ohm.new(18.0) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
strom-0.0.2 | test/variable_test.rb |