mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Except & only cli flags
This commit is contained in:
parent
34707903b8
commit
dceafd26e5
7 changed files with 99 additions and 70 deletions
|
@ -46,13 +46,5 @@ module Ameba
|
|||
config.formatter.should eq formatter
|
||||
end
|
||||
end
|
||||
|
||||
describe "#subconfig" do
|
||||
it "returns a specific subconfig" do
|
||||
config = Config.load config_sample
|
||||
config.subconfig("NoSuchConfig").should be_nil
|
||||
config.subconfig(Rule::LineLength.new.name).should_not be_nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -48,10 +48,11 @@ module Ameba
|
|||
end
|
||||
|
||||
it "returns false if there are invalid sources" do
|
||||
rules = Rule.rules.map &.new
|
||||
s = Source.new %q(
|
||||
WrongConstant = 5
|
||||
)
|
||||
Runner.new([s], formatter).run.success?.should be_false
|
||||
Runner.new(rules, [s], formatter).run.success?.should be_false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue