Sha256: 6de6c861fea6403faf9240d0dd6256901dcc63aa90f60e6c7f301307b6a3122d
Contents?: true
Size: 490 Bytes
Versions: 5
Compression:
Stored size: 490 Bytes
Contents
require 'test/unit' require 'iz' class TestMac < Test::Unit::TestCase def valid_mac_values ['aabbccddeeff', 'aa:bb:cc:dd:ee:ff', '11-22-33-44-55-66'] end def invalid_mac_values [nil, false, -1, '', '1112', 'g', '10101a'] end def test_that_mac_values_return_true valid_mac_values.each do |mac| assert Iz.mac?(mac) end end def test_that_invalid_mac_values_return_false invalid_mac_values.each do |mac| assert !Iz.mac?(mac) end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
iz-0.3.1 | test/test_mac.rb |
iz-0.3.0 | test/test_mac.rb |
iz-0.2.1 | test/test_mac.rb |
iz-0.2.0 | test/test_mac.rb |
iz-0.1.0 | test/test_mac.rb |