diff --git a/spec/ameba/rule/typing/proc_literal_return_type_restriction_spec.cr b/spec/ameba/rule/typing/proc_literal_return_type_restriction_spec.cr index 6ad5c264b..dacb4da1d 100644 --- a/spec/ameba/rule/typing/proc_literal_return_type_restriction_spec.cr +++ b/spec/ameba/rule/typing/proc_literal_return_type_restriction_spec.cr @@ -3,18 +3,16 @@ require "../../../spec_helper" module Ameba::Rule::Typing subject = ProcLiteralReturnTypeRestriction.new - it "passes if a proc literal has a return type" do + it "passes if a proc literal has a return type restriction" do expect_no_issues subject, <<-CRYSTAL my_proc = ->(var : String) : Nil { puts var } - my_proc.call(nil) CRYSTAL end - it "fails if a proc literal doesn't have a return type" do + it "fails if a proc literal doesn't have a return type restriction" do expect_issue subject, <<-CRYSTAL my_proc = ->(var : String) { puts var } # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Proc literal should have a return type restriction - my_proc.call(nil) CRYSTAL end end