diff --git a/spec/ameba/rules/line_length_spec.cr b/spec/ameba/rules/line_length_spec.cr index 0ae1972b..23b25098 100644 --- a/spec/ameba/rules/line_length_spec.cr +++ b/spec/ameba/rules/line_length_spec.cr @@ -10,6 +10,11 @@ module Ameba::Rules subject.catch(source).valid?.should be_true end + it "passes if line consists of 79 symbols" do + source = Source.new "*" * 79 + subject.catch(source).valid?.should be_true + end + it "fails if there is at least one line longer than 79 symbols" do source = Source.new long_line subject.catch(source).valid?.should be_false diff --git a/src/ameba/rules/comparison_to_boolean.cr b/src/ameba/rules/comparison_to_boolean.cr index bd767db3..3d4e61c0 100644 --- a/src/ameba/rules/comparison_to_boolean.cr +++ b/src/ameba/rules/comparison_to_boolean.cr @@ -9,8 +9,8 @@ module Ameba::Rules # false === baz # ``` # This is because these expressions evaluate to `true` or `false`, so you - # could get the same result by using either the variable directly, or negating - # the variable. + # could get the same result by using either the variable directly, + # or negating the variable. struct ComparisonToBoolean < Rule def test(source) CallVisitor.new self, source