Sha256: dfbc08684f84aca1cd5115cf9cdaedef53c5c13a24fc4ad332669215a1700ab3

Contents?: true

Size: 967 Bytes

Versions: 1

Compression:

Stored size: 967 Bytes

Contents

require_relative '../../../../test_helper'
require_relative '../../../../../lib/vedeu/support/parsing/hash_parser'

module Vedeu
  describe HashParser do
    describe '.parse' do
      it 'returns a Hash when the output is content for multiple interfaces' do
        HashParser.parse({
          test: 'Some content...',
          dummy: 'More content...'
        }).must_equal({
          interfaces: [
            { name: "test", lines:  [
              { streams: { text: "Some content..." } }] },
            { name: "dummy", lines: [
              { streams: { text: "More content..." } }] }
          ]
        })
      end

      it 'returns a Hash when the output is content for a single interface' do
        HashParser.parse({
          dummy: 'Some content...'
        }).must_equal({
          interfaces: [
            { name: "dummy", lines: [
              { streams: { text: "Some content..." } }] }
          ]
        })
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vedeu-0.0.32 test/lib/vedeu/support/parsing/hash_parser_test.rb