diff --git a/spec/ameba/severity_spec.cr b/spec/ameba/severity_spec.cr index 633372b0..9fd17a21 100644 --- a/spec/ameba/severity_spec.cr +++ b/spec/ameba/severity_spec.cr @@ -34,7 +34,7 @@ module Ameba end it "raises when name is incorrect" do - expect_raises(Exception, "Incorrect severity name BadName. Try one of [Error, Warning, Convention]") do + expect_raises(Exception, "Incorrect severity name BadName. Try one of: Error, Warning, Convention") do Severity.parse("BadName") end end diff --git a/src/ameba/rule/lint/missing_block_argument.cr b/src/ameba/rule/lint/missing_block_argument.cr index b5420f4d..379bfa85 100644 --- a/src/ameba/rule/lint/missing_block_argument.cr +++ b/src/ameba/rule/lint/missing_block_argument.cr @@ -3,19 +3,15 @@ module Ameba::Rule::Lint # # For example, this is considered invalid: # - # ``` - # def foo - # yield 42 - # end - # ``` + # def foo + # yield 42 + # end # # And has to be written as the following: # - # ``` - # def foo(&) - # yield 42 - # end - # ``` + # def foo(&) + # yield 42 + # end # # YAML configuration example: # diff --git a/src/ameba/severity.cr b/src/ameba/severity.cr index ed350a96..19e5a809 100644 --- a/src/ameba/severity.cr +++ b/src/ameba/severity.cr @@ -41,7 +41,7 @@ module Ameba def self.parse(name : String) super name rescue ArgumentError - raise "Incorrect severity name #{name}. Try one of #{values}" + raise "Incorrect severity name #{name}. Try one of: #{values.map(&.to_s).join(", ")}" end end