Sha256: 8856e674d406fdd4a6c981c4570bef7cbb0dd6c423769171310fc96ca6f12d62
Contents?: true
Size: 999 Bytes
Versions: 20
Compression:
Stored size: 999 Bytes
Contents
require 'pio/set_vlan_priority' describe Pio::SetVlanPriority do describe '.new' do When(:set_vlan_priority) { Pio::SetVlanPriority.new(priority) } context 'with 3' do When(:priority) { 3 } describe '#vlan_priority' do Then { set_vlan_priority.vlan_priority == 3 } end describe '#type' do Then { set_vlan_priority.type == 2 } end describe '#message_length' do Then { set_vlan_priority.message_length == 8 } end describe '#to_binary' do Then { set_vlan_priority.to_binary.length == 8 } end end context 'with -1' do When(:priority) { -1 } Then { set_vlan_priority == Failure(ArgumentError) } end context 'with 8' do When(:priority) { 8 } Then { set_vlan_priority == Failure(ArgumentError) } end context 'with :INVALID_PRIORITY' do When(:priority) { :INVALID_PRIORITY } Then { set_vlan_priority == Failure(TypeError) } end end end
Version data entries
20 entries across 20 versions & 1 rubygems