Sha256: 98dc6e76e2975d0f0138476f9e624b1dec4acf2d3327b6f8d4027df53c3dbc6b

Contents?: true

Size: 567 Bytes

Versions: 2

Compression:

Stored size: 567 Bytes

Contents

require File.join( File.dirname( __FILE__ ), "..", "..", "spec_helper" )
require "pio/lldp/ttl-tlv"


module Pio
  class Lldp
    describe TtlTlv do
      subject { TtlTlv.read( data.pack( "C*" ) ) }

      context "parsing a raw data" do
        let( :data ) { [ 0x06, 0x02, 0x00, 0x78 ] }

        its( :tlv_type ) { should eq 3 }
        its( :tlv_info_length ) { should eq 2 }
        its( :ttl ) { should eq data[ -2..-1 ].pack( "C*" ) }
      end
    end
  end
end


### Local variables:
### mode: Ruby
### coding: utf-8-unix
### indent-tabs-mode: nil
### End:

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pio-0.1.1 spec/pio/lldp/ttl-tlv_spec.rb
pio-0.1.0 spec/pio/lldp/ttl-tlv_spec.rb