Sha256: 98e4514cd0b1c753eb9aa42f92392dcd255ea9d8e23177a21d7c27ec47a1a73e

Contents?: true

Size: 665 Bytes

Versions: 7

Compression:

Stored size: 665 Bytes

Contents

require 'spec_helper'

module Depth
  RSpec.describe ComplexHash do
    let(:hash) do
      { '$and' => [
        { '#weather' => { 'something' => [] } },
        { '#weather' => { 'something' => [] } },
        { '#weather' => { 'something' => [] } },
        { '$or' => [
          { '#otherfeed' => {'thing' => [] } },
        ]}
      ]}
    end

    subject { described_class.new(hash) }

    describe '#base' do
      it 'should return the underlying hash' do
        expect(subject.base).to eq hash
      end
    end

    describe '#to_h' do
      it 'should be aliased to base' do
        expect(subject.to_h).to be subject.base
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
depth-0.4.3 spec/depth/complex_hash_spec.rb
depth-0.4.2 spec/depth/complex_hash_spec.rb
depth-0.4.1 spec/depth/complex_hash_spec.rb
depth-0.4.0 spec/depth/complex_hash_spec.rb
depth-0.3.0 spec/depth/complex_hash_spec.rb
depth-0.1.0 spec/depth/complex_hash_spec.rb
depth-0.0.2 spec/depth/complex_hash_spec.rb