Sha256: e04fdade8003bdaecd8d34f74ef6c20925409030acb3d3e29245c23f9eadd655
Contents?: true
Size: 470 Bytes
Versions: 16
Compression:
Stored size: 470 Bytes
Contents
require File.instance_eval { expand_path join(dirname(__FILE__), 'test_helper') } require 'freighthopper' class FloatTest < Test::Unit::TestCase context 'to_s with format' do should 'work as before' do assert_to_s '1.1', 1.1 end should 'allow specification of a format string' do assert_equal "1.2", 1.23.to_s("%.1f") end should 'allow specification of a precision' do assert_equal '1.2', 1.23.to_s(1) end end end
Version data entries
16 entries across 16 versions & 2 rubygems