From b6a2e8ea582021d9a0ccc52cef40645104e3ab3f Mon Sep 17 00:00:00 2001 From: Murray Steele Date: Wed, 3 Jul 2024 10:00:02 +0100 Subject: [PATCH] Fix rubocop-rspec by removing a redundant `let` Only allowed 15 `let` or `subject`s for a given spec, and we now have 16. Removing the `with_null` memoization lets us proceed. In theory it would have allowed us to run the specs with_null set to both true and false, but in practice, we weren't, and the other memoized values _were_ useful for customising the specs. --- .../apipie/generator/swagger/param_description/type_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/lib/apipie/generator/swagger/param_description/type_spec.rb b/spec/lib/apipie/generator/swagger/param_description/type_spec.rb index 93999b4d..9d45ec62 100644 --- a/spec/lib/apipie/generator/swagger/param_description/type_spec.rb +++ b/spec/lib/apipie/generator/swagger/param_description/type_spec.rb @@ -3,7 +3,6 @@ describe Apipie::Generator::Swagger::ParamDescription::Type do let(:validator_options) { {} } let(:param_description_options) { {}.merge(validator_options) } - let(:with_null) { false } let(:http_method) { :GET } let(:path) { '/api' } let(:validator) { String } @@ -67,7 +66,7 @@ let(:type_definition) do described_class. - new(param_description, with_null: with_null, controller_method: controller_method). + new(param_description, with_null: false, controller_method: controller_method). to_hash end