Skip to content

Commit

Permalink
fix: Hash compact (#132)
Browse files Browse the repository at this point in the history
Co-authored-by: nicolasleger <[email protected]>
  • Loading branch information
nicolasleger and nicolasleger authored Feb 5, 2025
1 parent 36cb732 commit 5f5a30f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/lib/tracking_hash_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@
end
# rubocop:enable RSpec/MultipleExpectations
# rubocop:enable RSpec/ExampleLength

context "with compact option" do
it "removes empty values" do
expect(described_class.nilify_empty_values(
{ "f" => [nil] },
compact: true
)).to eq({ "f" => [] })
end
end
end

describe "#[]" do
Expand Down

0 comments on commit 5f5a30f

Please sign in to comment.