Sha256: ed586f771d41a88f623e91d51ca7069e63c32f85b2d27bdb8c040072648bd448

Contents?: true

Size: 790 Bytes

Versions: 17

Compression:

Stored size: 790 Bytes

Contents

require 'pio/set_eth_addr'

describe Pio::SetEthDstAddr do
  describe '.new' do
    Given(:set_eth_dst_addr) do
      Pio::SetEthDstAddr.new(mac_address)
    end

    context "with '11:22:33:44:55:66'" do
      When(:mac_address) { '11:22:33:44:55:66' }
      Then { set_eth_dst_addr.mac_address == '11:22:33:44:55:66' }

      describe '#to_binary' do
        Then { set_eth_dst_addr.to_binary.length == 16 }
      end
    end

    context 'with 0x112233445566' do
      When(:mac_address) { 0x112233445566 }
      Then { set_eth_dst_addr.mac_address == '11:22:33:44:55:66' }
    end

    context "with Pio::Mac.new('11:22:33:44:55:66')" do
      When(:mac_address) { Pio::Mac.new('11:22:33:44:55:66') }
      Then { set_eth_dst_addr.mac_address == '11:22:33:44:55:66' }
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
pio-0.19.0 spec/pio/set_eth_dst_addr_spec.rb
pio-0.18.2 spec/pio/set_eth_dst_addr_spec.rb
pio-0.18.1 spec/pio/set_eth_dst_addr_spec.rb
pio-0.18.0 spec/pio/set_eth_dst_addr_spec.rb
pio-0.17.0 spec/pio/set_eth_dst_addr_spec.rb
pio-0.16.0 spec/pio/set_eth_dst_addr_spec.rb
pio-0.15.2 spec/pio/set_eth_dst_addr_spec.rb
pio-0.15.1 spec/pio/set_eth_dst_addr_spec.rb
pio-0.15.0 spec/pio/set_eth_dst_addr_spec.rb
pio-0.14.0 spec/pio/set_eth_dst_addr_spec.rb
pio-0.13.0 spec/pio/set_eth_dst_addr_spec.rb
pio-0.12.0 spec/pio/set_eth_dst_addr_spec.rb
pio-0.11.2 spec/pio/set_eth_dst_addr_spec.rb
pio-0.11.1 spec/pio/set_eth_dst_addr_spec.rb
pio-0.11.0 spec/pio/set_eth_dst_addr_spec.rb
pio-0.10.1 spec/pio/set_eth_dst_addr_spec.rb
pio-0.10.0 spec/pio/set_eth_dst_addr_spec.rb