Specs cleanup

This commit is contained in:
Sijawusz Pur Rahnama 2022-12-19 18:03:11 +01:00
parent e6ebca7a5b
commit 8112dddc8f
24 changed files with 267 additions and 251 deletions

View file

@ -24,12 +24,12 @@ module Ameba::Rule::Lint
end
it "reports rule, pos and message" do
source = Source.new %(
source = Source.new <<-CRYSTAL, "source.cr"
require "./thing"
require "./thing"
require "./another_thing"
require "./another_thing"
), "source.cr"
CRYSTAL
subject.catch(source).should_not be_valid

View file

@ -13,7 +13,7 @@ module Ameba
describe Rule::Lint::EmptyExpression do
it "passes if there is no empty expression" do
s = Source.new %(
s = Source.new <<-CRYSTAL
def method()
end
@ -30,7 +30,7 @@ module Ameba
begin "" end
[nil] << nil
)
CRYSTAL
subject.catch(s).should be_valid
end