linkingpaths / alea

Bringing random feelings to the Kernel since 2008

This URL has Read+Write access

alea / test / test_range.rb
100644 10 lines (7 sloc) 0.217 kb
1
2
3
4
5
6
7
8
9
10
require File.dirname(__FILE__) + '/test_helper.rb'
 
class TestRange < Test::Unit::TestCase
 
  def test_regular_percent
    estimation = (5..10).percent.of(100)
    assert estimation >= 5 && estimation <= 10
  end
end