rubyx/test/virtual/test_padding.rb
2015-07-19 10:54:36 +03:00

28 lines
518 B
Ruby

require_relative "../helper"
class Padded
include Padding
end
class TestPadding < MiniTest::Test
def setup
@pad = Padded.new
end
def test_small
[6,20,23,24].each do |p|
assert_equal 32 , @pad.padded(p) , "Expecting 32 for #{p}"
end
end
def test_medium
[26,40,53,56].each do |p|
assert_equal 64 , @pad.padded(p) , "Expecting 64 for #{p}"
end
end
def test_large
[58,88].each do |p|
assert_equal 96 , @pad.padded(p) , "Expecting 96 for #{p}"
end
end
end