Sha256: 1ce3116da8180f8ca9d4a5c833e022441f27ca10a5db49fab2429043e0a8b2a7
Contents?: true
Size: 742 Bytes
Versions: 2
Compression:
Stored size: 742 Bytes
Contents
require 'test_helper' require 'chemistry/temperature/fahrenheit' class ToITest < MiniTest::Unit::TestCase def test_returns_temperature temp = 1 assert_equal Chemistry::Temperature::Unit.new(temp).to_i, temp.to_i end end class ToFTest < MiniTest::Unit::TestCase def test_returns_temperature temp = 1.0 assert_equal Chemistry::Temperature::Unit.new(temp).to_f, temp.to_f end end class EqualityTest < MiniTest::Unit::TestCase def test_nontemperatures_return_false temp = Chemistry::Temperature::Fahrenheit.new(1) refute_equal temp, 'a' end def test_32F_and_0C_return_true f = Chemistry::Temperature::Fahrenheit.new(32) c = Chemistry::Temperature::Celsius.new(0) assert_equal f, c end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
chemistry-temperature-1.0.1 | test/chemistry/temperature/test_unit.rb |
chemistry-temperature-1.0.0 | test/chemistry/temperature/test_unit.rb |