Sha256: 3db844fd7646a1ac8c0d058715d8fcd581c8f22596d6c5619a21b155fe0e35d1

Contents?: true

Size: 883 Bytes

Versions: 9

Compression:

Stored size: 883 Bytes

Contents

Testing Mac do
  $data.each do |basename, output|
    testing "#{ basename } output" do
      expected = basename

      macaddr = assert{ Mac.parse(output) }

      assert{ macaddr.is_a?(String) }
      assert{ macaddr =~ Mac::RE }
      assert{ macaddr.list.is_a?(Array) }
      assert{ macaddr == expected }
    end
  end


  testing ".addr" do
    assert{ Mac.addr }
  end
end


### c8\:bc\:c8\:9b\:28\:b1

BEGIN {
  $testdir = File.dirname(File.expand_path(__FILE__))
  $rootdir = File.dirname($testdir)
  $libdir = File.join($rootdir, 'lib')
  require File.join($libdir, 'macaddr')
  require File.join($testdir, 'testing')

  $datadir = File.join($testdir, 'data')
  $data = {}

  {
    'c8:bc:c8:9b:28:b1' => 'osx',
    'd0:4e:f1:68:29:79' => 'noifconfig'
  }.each do |expected, basename|
    entry = File.join($datadir, basename)
    $data[expected] = IO.read(entry)
  end
}

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
macaddr-1.7.2 test/mac_test.rb
macaddr-1.7.1 test/mac_test.rb
macaddr-1.7.0 test/mac_test.rb
macaddr-1.6.7 test/mac_test.rb
macaddr-1.6.6 test/mac_test.rb
macaddr-1.6.5 test/mac_test.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/macaddr-1.6.1/test/mac_test.rb
macaddr-1.6.1 test/mac_test.rb
macaddr-1.6.0 test/mac_test.rb