Skip to content

Commit a68b90d

Browse files
committed
Add changelog and rspec
1 parent 7a44cb5 commit a68b90d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#### Fixes
88

99
* Your contribution here.
10-
10+
* [#384](https://github.com/ruby-grape/grape-entity/pull/384): Fixed the `inspect` method to correctly handle nil values. - [@fcce](https://github.com/fcce).
1111

1212
### ### 1.0.1 (2024-04-10)
1313

spec/grape_entity/entity_spec.rb

+6
Original file line numberDiff line numberDiff line change
@@ -1769,6 +1769,12 @@ class NoPathCharacterEntity < Grape::Entity
17691769
expect(data).to_not include '@options'
17701770
expect(data).to_not include '@delegator'
17711771
end
1772+
1773+
it 'returns a nil string when subject is nil' do
1774+
data = subject.class.new(nil).inspect
1775+
expect(data).to include 'nil'
1776+
end
1777+
17721778
end
17731779

17741780
describe '#value_for' do

0 commit comments

Comments
 (0)