Skip to content

Commit

Permalink
Fix rubocop-rspec by removing a redundant let
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
h-lame committed Jul 9, 2024
1 parent 1a4550f commit 28ba4a7
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 28ba4a7

Please sign in to comment.