Skip to content

Commit

Permalink
Merge pull request #199 from crystal-ameba/Sija/rename-chained-calls-…
Browse files Browse the repository at this point in the history
…with-no-bang

ChainedCallsWithNoBang -> ChainedCallWithNoBang
  • Loading branch information
Sija authored Jan 22, 2021
2 parents 79ff1f7 + 6acb8ad commit 8b52dc4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
require "../../../spec_helper"

module Ameba::Rule::Performance
subject = ChainedCallsWithNoBang.new
subject = ChainedCallWithNoBang.new

describe ChainedCallsWithNoBang do
describe ChainedCallWithNoBang do
it "passes if there is no potential performance improvements" do
source = Source.new %(
(1..3).select { |e| e > 1 }.sort!
Expand Down Expand Up @@ -35,7 +35,7 @@ module Ameba::Rule::Performance
source = Source.new %(
[1, 2, 3].select { |e| e > 2 }.reverse
)
rule = ChainedCallsWithNoBang.new
rule = ChainedCallWithNoBang.new
rule.call_names = %w(uniq)
rule.catch(source).should be_valid
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module Ameba::Rule::Performance
# YAML configuration example:
#
# ```
# Performance/ChainedCallsWithNoBang
# Performance/ChainedCallWithNoBang
# Enabled: true
# CallNames:
# - uniq
Expand All @@ -34,7 +34,7 @@ module Ameba::Rule::Performance
# - shuffle
# - reverse
# ```
class ChainedCallsWithNoBang < Base
class ChainedCallWithNoBang < Base
properties do
description "Identifies usage of chained calls not utilizing the bang method variants."

Expand Down

0 comments on commit 8b52dc4

Please sign in to comment.