Fix newly found issues

This commit is contained in:
Sijawusz Pur Rahnama 2021-01-22 02:37:11 +01:00
parent d71091a40c
commit 7b3c814914
7 changed files with 8 additions and 8 deletions

View file

@ -51,7 +51,7 @@ module Ameba::AST
it "adds a new variable to the scope" do
scope = Scope.new as_node("")
scope.add_variable(Crystal::Var.new "foo")
scope.variables.any?.should be_true
scope.variables.empty?.should be_false
end
end

View file

@ -48,7 +48,7 @@ module Ameba::AST
it "assigns the variable (creates a new assignment)" do
variable = Variable.new(var_node, scope)
variable.assign(assign_node, scope)
variable.assignments.any?.should be_true
variable.assignments.empty?.should be_false
end
it "can create multiple assignments" do
@ -64,7 +64,7 @@ module Ameba::AST
variable = Variable.new(var_node, scope)
variable.assign(as_node("foo=1"), scope)
variable.reference(var_node, scope)
variable.references.any?.should be_true
variable.references.empty?.should be_false
end
it "adds a reference to the scope" do