Sha256: 1136fd400acaf3d72e98b67b05cbcb275bb6e2f569011b57b61c7baed18cdafd

Contents?: true

Size: 531 Bytes

Versions: 4

Compression:

Stored size: 531 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper'

class ExtTest < Test::Unit::TestCase
  
  def test_conversions
    assert_in_delta 1.609344, 1.miles.to(:kilometres), DELTA
    assert_in_delta 1.609344, 1.0.miles.to(:kilometres), DELTA
    assert_in_delta 0.45359237, 1.pounds.to(:kilograms), DELTA
    assert_in_delta 0.00110231131092439, 1.kilograms.to(:tons), DELTA
    assert_in_delta 2.20462262184878, 1.kilograms.to(:pounds), DELTA
    assert_in_delta 1, ( 1.kilograms.to(:pounds) * 1.pounds.to(:kilograms) ), DELTA
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
Fingertips-conversions-1.2.1 test/ext_test.rb
seamusabshere-conversions-1.2.1 test/ext_test.rb
seamusabshere-conversions-1.2.2 test/ext_test.rb
seamusabshere-conversions-1.2 test/ext_test.rb