File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 7
7
#### Fixes
8
8
9
9
* 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 ) .
11
11
12
12
### ### 1.0.1 (2024-04-10)
13
13
Original file line number Diff line number Diff line change @@ -1754,7 +1754,6 @@ class NoPathCharacterEntity < Grape::Entity
1754
1754
end
1755
1755
end
1756
1756
end
1757
-
1758
1757
describe '#inspect' do
1759
1758
before do
1760
1759
fresh_class . class_eval do
@@ -1769,6 +1768,12 @@ class NoPathCharacterEntity < Grape::Entity
1769
1768
expect ( data ) . to_not include '@options'
1770
1769
expect ( data ) . to_not include '@delegator'
1771
1770
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
+
1772
1777
end
1773
1778
1774
1779
describe '#value_for' do
You can’t perform that action at this time.
0 commit comments