Sha256: 3de60e4d0c53734d47e3d9e5fcc60caba60f3f65162d7707b9247893666ea2e4

Contents?: true

Size: 806 Bytes

Versions: 4

Compression:

Stored size: 806 Bytes

Contents

require 'pio/open_flow10/error/hello_failed'

describe Pio::OpenFlow10::Error::HelloFailed do
  it_should_behave_like('an OpenFlow message',
                        Pio::OpenFlow10::Error::HelloFailed)

  describe '.new' do
    When(:hello_failed) { Pio::OpenFlow10::Error::HelloFailed.new(options) }

    context 'with {}' do
      Given(:options) { {} }

      Then { hello_failed.length == 12 }
      Then { hello_failed.error_type == :hello_failed }
      Then { hello_failed.error_code == :incompatible }
      Then { hello_failed.description == '' }
    end

    context "with description: 'error description'" do
      Given(:options) { { description: 'error description' } }

      Then { hello_failed.length == 29 }
      Then { hello_failed.description == 'error description' }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pio-0.30.1 spec/pio/open_flow10/error/hello_failed_spec.rb
pio-0.27.1 spec/pio/open_flow10/error/hello_failed_spec.rb
pio-0.27.0 spec/pio/open_flow10/error/hello_failed_spec.rb
pio-0.26.0 spec/pio/open_flow10/error/hello_failed_spec.rb