Read rubocop offenses as const from corresponding class in tests
This commit is contained in:
parent
b8adc1a8aa
commit
222af82401
@ -18,7 +18,7 @@ describe RuboCop::Cop::FormulaAuditStrict::BottleBlock do
|
|||||||
end
|
end
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
expected_offenses = [{ message: "Use rebuild instead of revision in bottle block",
|
expected_offenses = [{ message: described_class::MSG,
|
||||||
severity: :convention,
|
severity: :convention,
|
||||||
line: 5,
|
line: 5,
|
||||||
column: 4,
|
column: 4,
|
||||||
|
|||||||
@ -16,11 +16,7 @@ describe RuboCop::Cop::FormulaAudit::Conflicts do
|
|||||||
end
|
end
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
msg = <<-EOS.undent
|
expected_offenses = [{ message: described_class::MSG,
|
||||||
Versioned formulae should not use `conflicts_with`.
|
|
||||||
Use `keg_only :versioned_formula` instead.
|
|
||||||
EOS
|
|
||||||
expected_offenses = [{ message: msg,
|
|
||||||
severity: :convention,
|
severity: :convention,
|
||||||
line: 3,
|
line: 3,
|
||||||
column: 2,
|
column: 2,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user