Sha256: a4beada3fb89a3d897556dd4a1c64bcbd19210a52e7fab8601139be74a7a3e2f

Contents?: true

Size: 452 Bytes

Versions: 1

Compression:

Stored size: 452 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 '#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.1 test/variable_test.rb