Sha256: 8a408868afc88d758f6ecb9577022c6a3a3c80605d7ecb1d7c183fe352343ece
Contents?: true
Size: 589 Bytes
Versions: 2
Compression:
Stored size: 589 Bytes
Contents
# frozen_string_literal: true module Rordash RSpec.describe Chain do let(:instance) { described_class.new(value) } describe "#to_h" do let(:value) { JSON.dump(a: 1) } it "chains underlying hash util method" do expect(instance.to_h.value).to eql(a: 1) end end describe "#deep_compact" do let(:value) { { a: { b: { c: nil } }, d: 1, e: [], f: [1, 2, nil, 3, nil] } } it "chains underlying hash util method" do expect( instance.deep_compact.value ).to eql(e: [], f: [1, 2, 3]) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rordash-0.1.3 | spec/rordash/chain_spec.rb |
rordash-0.1.2 | spec/rordash/chain_spec.rb |