Skip to content

Fixes issue of looking at all empty rspec lines

Doug Stull requested to merge fix-let-empty-line-helper into master
  • we only want to look at let* items.

before this fix, we were including all block items(perhaps good, but not the focus of this cop)

#<RuboCop::RSpec::Language::SelectorSet:0x00007f92263d5648 @selectors=[:describe, :context, :feature, :example_group, :xdescribe, :xcontext, :xfeature, :fdescribe, :fcontext, :ffeature, :shared_examples, :shared_examples_for, :shared_context, :it, :specify, :example, :scenario, :its, :fit, :fspecify, :fexample, :fscenario, :focus, :xit, :xspecify, :xexample, :xscenario, :skip, :pending, :prepend_before, :before, :append_before, :around, :prepend_after, :after, :append_after, :let, :let!, :subject, :subject!, :expect, :is_expected, :expect_any_instance_of, :to, :to_not, :not_to]>

after, now the LET variable includes the correct items

#<RuboCop::RSpec::Language::SelectorSet:0x00007f8b9224a2f0 @selectors=[:let_it_be, :let, :let!]>

noticed while implementing gitlab-org/gitlab!47015 (diffs)

Edited by Doug Stull

Merge request reports