@@ -798,9 +798,9 @@ class Parent < Person
798
798
end
799
799
800
800
it 'does not expose attributes that are generated by a block but have not passed criteria' do
801
- fresh_class . expose :nonexistent_attribute , proc : lambda { | _model , _opts |
802
- 'I exist, but it is not yet my time to shine'
803
- } , if : lambda { |_model , _opts | false }
801
+ fresh_class . expose :nonexistent_attribute ,
802
+ proc : lambda { | _model , _opts | 'I exist, but it is not yet my time to shine' } ,
803
+ if : lambda { |_model , _opts | false }
804
804
res = fresh_class . new ( model ) . serializable_hash
805
805
expect ( res ) . not_to have_key :nonexistent_attribute
806
806
end
@@ -820,9 +820,9 @@ class TestEntity < Grape::Entity
820
820
end
821
821
822
822
it 'does not expose attributes that are generated by a block but have not passed criteria' do
823
- fresh_class . expose :nonexistent_attribute , proc : lambda { | _ , _ |
824
- 'I exist, but it is not yet my time to shine'
825
- } , if : lambda { |_ , _ | false }
823
+ fresh_class . expose :nonexistent_attribute ,
824
+ proc : lambda { | _ , _ | 'I exist, but it is not yet my time to shine' } ,
825
+ if : lambda { |_ , _ | false }
826
826
res = fresh_class . new ( model ) . serializable_hash
827
827
expect ( res ) . not_to have_key :nonexistent_attribute
828
828
end
0 commit comments