Fix failing spec

This commit is contained in:
Sijawusz Pur Rahnama 2022-12-19 17:53:43 +01:00
parent 3bc8bda008
commit d7154ad6d2

View file

@ -175,10 +175,11 @@ module Ameba
it "depends on the level of severity" do
rules = Rule.rules.map &.new.as(Rule::Base)
s = Source.new %q(WrongConstant = 5)
Runner.new(rules, [s], formatter, Severity::Error).run.success?.should be_true
Runner.new(rules, [s], formatter, Severity::Warning).run.success?.should be_true
Runner.new(rules, [s], formatter, Severity::Convention).run.success?.should be_false
source = Source.new "WrongConstant = 5\n"
Runner.new(rules, [source], formatter, :error).run.success?.should be_true
Runner.new(rules, [source], formatter, :warning).run.success?.should be_true
Runner.new(rules, [source], formatter, :convention).run.success?.should be_false
end
it "returns false if issue is disabled" do