diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /spec/rubocop/cop/avoid_break_from_strong_memoize_spec.rb | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'spec/rubocop/cop/avoid_break_from_strong_memoize_spec.rb')
-rw-r--r-- | spec/rubocop/cop/avoid_break_from_strong_memoize_spec.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/rubocop/cop/avoid_break_from_strong_memoize_spec.rb b/spec/rubocop/cop/avoid_break_from_strong_memoize_spec.rb index 3c3aa5b7b5c..ac59d36db3f 100644 --- a/spec/rubocop/cop/avoid_break_from_strong_memoize_spec.rb +++ b/spec/rubocop/cop/avoid_break_from_strong_memoize_spec.rb @@ -5,8 +5,6 @@ require 'rubocop' require_relative '../../../rubocop/cop/avoid_break_from_strong_memoize' RSpec.describe RuboCop::Cop::AvoidBreakFromStrongMemoize do - include CopHelper - subject(:cop) { described_class.new } it 'flags violation for break inside strong_memoize' do @@ -56,7 +54,7 @@ RSpec.describe RuboCop::Cop::AvoidBreakFromStrongMemoize do call do strong_memoize(:result) do break if something - + ^^^^^ Do not use break inside strong_memoize, use next instead. do_an_heavy_calculation end end @@ -65,7 +63,7 @@ RSpec.describe RuboCop::Cop::AvoidBreakFromStrongMemoize do expect(instance).to receive(:add_offense).once end - inspect_source(source) + expect_offense(source) end it "doesn't check when block is empty" do |