Sha256: aa3e8ec0d48da4fe8ce4a6a41a861e7e0f54c0f9ec9023c254b3bf4bc0277dae

Contents?: true

Size: 790 Bytes

Versions: 17

Compression:

Stored size: 790 Bytes

Contents

require 'pio/set_eth_addr'

describe Pio::SetEthSrcAddr do
  describe '.new' do
    Given(:set_eth_src_addr) do
      Pio::SetEthSrcAddr.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_src_addr.mac_address == '11:22:33:44:55:66' }

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

    context 'with 0x112233445566' do
      When(:mac_address) { 0x112233445566 }
      Then { set_eth_src_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_src_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_src_addr_spec.rb
pio-0.18.2 spec/pio/set_eth_src_addr_spec.rb
pio-0.18.1 spec/pio/set_eth_src_addr_spec.rb
pio-0.18.0 spec/pio/set_eth_src_addr_spec.rb
pio-0.17.0 spec/pio/set_eth_src_addr_spec.rb
pio-0.16.0 spec/pio/set_eth_src_addr_spec.rb
pio-0.15.2 spec/pio/set_eth_src_addr_spec.rb
pio-0.15.1 spec/pio/set_eth_src_addr_spec.rb
pio-0.15.0 spec/pio/set_eth_src_addr_spec.rb
pio-0.14.0 spec/pio/set_eth_src_addr_spec.rb
pio-0.13.0 spec/pio/set_eth_src_addr_spec.rb
pio-0.12.0 spec/pio/set_eth_src_addr_spec.rb
pio-0.11.2 spec/pio/set_eth_src_addr_spec.rb
pio-0.11.1 spec/pio/set_eth_src_addr_spec.rb
pio-0.11.0 spec/pio/set_eth_src_addr_spec.rb
pio-0.10.1 spec/pio/set_eth_src_addr_spec.rb
pio-0.10.0 spec/pio/set_eth_src_addr_spec.rb