Sha256: b49eec377f6c5a65c2add9488c601e8eac5cd39fc6c4d09541c574d67aa71433

Contents?: true

Size: 652 Bytes

Versions: 26

Compression:

Stored size: 652 Bytes

Contents

require 'spec_helper'
require 'td/compact_format_yamler'

module TreasureData
  describe TreasureData::CompactFormatYamler do
    describe '.dump' do
      let(:data) {
        {
          'a' => {
            'b' => {
              'c' => 1,
              'd' => 'e'
            },
            'f' => [1, 2, 3]
          }
        }
      }

      let(:comapct_format_yaml) {
        <<-EOS
---
a:
  b: {c: 1, d: e}
  f:
  - 1
  - 2
  - 3
        EOS
      }

      subject { TreasureData::CompactFormatYamler.dump data }

      it 'use compact format for deepest Hash' do
        expect(subject).to eq comapct_format_yaml
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
td-0.17.1 spec/td/compact_format_yamler_spec.rb
td-0.17.0 spec/td/compact_format_yamler_spec.rb
td-0.16.10 spec/td/compact_format_yamler_spec.rb
td-0.16.9 spec/td/compact_format_yamler_spec.rb
td-0.16.8 spec/td/compact_format_yamler_spec.rb
td-0.16.7 spec/td/compact_format_yamler_spec.rb
td-0.16.6 spec/td/compact_format_yamler_spec.rb
td-0.16.5 spec/td/compact_format_yamler_spec.rb
td-0.16.4 spec/td/compact_format_yamler_spec.rb
td-0.16.3 spec/td/compact_format_yamler_spec.rb
td-0.16.1 spec/td/compact_format_yamler_spec.rb
td-0.16.0 spec/td/compact_format_yamler_spec.rb
td-0.15.9 spec/td/compact_format_yamler_spec.rb
td-0.15.8 spec/td/compact_format_yamler_spec.rb
td-0.15.7 spec/td/compact_format_yamler_spec.rb
td-0.15.6 spec/td/compact_format_yamler_spec.rb
td-0.15.5 spec/td/compact_format_yamler_spec.rb
td-0.15.4 spec/td/compact_format_yamler_spec.rb
td-0.15.3 spec/td/compact_format_yamler_spec.rb
td-0.15.2 spec/td/compact_format_yamler_spec.rb