Make spec helper methods private

This commit is contained in:
Sijawusz Pur Rahnama 2022-12-21 17:05:28 +01:00
parent 206b5ab604
commit 7c617b5a7b
2 changed files with 3 additions and 3 deletions

View file

@ -3,7 +3,7 @@ require "../../../spec_helper"
module Ameba
subject = Rule::Lint::EmptyExpression.new
def it_detects_empty_expression(code)
private def it_detects_empty_expression(code)
it "detects empty expression" do
s = Source.new code
rule = Rule::Lint::EmptyExpression.new

View file

@ -3,7 +3,7 @@ require "../../../spec_helper"
module Ameba
subject = Rule::Style::GuardClause.new
def it_reports_body(body, *, line = __LINE__)
private def it_reports_body(body, *, line = __LINE__)
rule = Rule::Style::GuardClause.new
it "reports an issue if method body is if / unless without else" do
@ -75,7 +75,7 @@ module Ameba
end
end
def it_reports_control_expression(kw, *, line = __LINE__)
private def it_reports_control_expression(kw, *, line = __LINE__)
rule = Rule::Style::GuardClause.new
it "reports an issue with #{kw} in the if branch" do