mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Specs cleanup
This commit is contained in:
parent
e6ebca7a5b
commit
8112dddc8f
24 changed files with 267 additions and 251 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue