Project

General

Profile

« Previous | Next » 

Revision d7c67746

Added by Michael Moll almost 6 years ago

Fixes #19873 - Fix Style/MultilineIfModifier cop (#5705)

  • Refs #20891 - fix for new rubocop rules
  • Fixes #19873 - Fix Style/MultilineIfModifier cop

View differences:

test/active_support_test_case_helper.rb
if field
model_errors = model.errors.map { |a, m| model.errors.full_message(a, m) unless field == a }.compact
assert model_errors.blank?, "#{model} contains #{model_errors}, it should not contain any"
assert model.errors[field].find { |e| e.match(match) }.present?,
"#{field} error matching #{match} not found: #{model.errors[field].inspect}" if match
if match
assert model.errors[field].find { |e| e.match(match) }.present?,
"#{field} error matching #{match} not found: #{model.errors[field].inspect}"
end
end
end
alias_method :assert_not_with_errors, :refute_with_errors

Also available in: Unified diff