Module: Range::Etest
- Defined in:
- lib/vex/base/range_ext.rb
Instance Method Summary collapse
Instance Method Details
#test_numeric ⇒ Object
25 26 27 |
# File 'lib/vex/base/range_ext.rb', line 25 def test_numeric assert_equal 1, -1.limit(1..3) end |
#test_range ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/vex/base/range_ext.rb', line 17 def test_range assert_equal 1, (1..3).limit(-1) assert_equal 1, (1..3).limit(1) assert_equal 2, (1..3).limit(2) assert_equal 3, (1..3).limit(3) assert_equal 3, (1..3).limit(4) end |