diff --git a/spec/rubocop/cop/performance/detect_spec.rb b/spec/rubocop/cop/performance/detect_spec.rb index cec1a3f..2f1fdbf 100644 --- a/spec/rubocop/cop/performance/detect_spec.rb +++ b/spec/rubocop/cop/performance/detect_spec.rb @@ -53,7 +53,7 @@ expect(cop.messages).to eq(["Use `detect` instead of `#{method}.first`."]) end - it "registers an offense when first is called on multiline #{method}" do + it "registers an offense when last is called on multiline #{method}" do inspect_source(cop, ["[1, 2, 3].#{method} do |i|", ' i % 2 == 0', 'end.last'])