File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -1754,7 +1754,6 @@ class NoPathCharacterEntity < Grape::Entity
17541754 end
17551755 end
17561756 end
1757-
17581757 describe '#inspect' do
17591758 before do
17601759 fresh_class . class_eval do
@@ -1769,6 +1768,12 @@ class NoPathCharacterEntity < Grape::Entity
17691768 expect ( data ) . to_not include '@options'
17701769 expect ( data ) . to_not include '@delegator'
17711770 end
1771+
1772+ it 'returns a nil string when subject is nil' do
1773+ data = subject . class . new ( nil ) . inspect
1774+ expect ( data ) . to include 'nil'
1775+ end
1776+
17721777 end
17731778
17741779 describe '#value_for' do
You can’t perform that action at this time.
0 commit comments