Refactor join("") to join.
This commit is contained in:
parent
13d9305fad
commit
44f56a0773
@ -460,7 +460,7 @@ module RuboCop
|
|||||||
when :str
|
when :str
|
||||||
node.str_content
|
node.str_content
|
||||||
when :dstr
|
when :dstr
|
||||||
node.each_child_node(:str).map(&:str_content).join("")
|
node.each_child_node(:str).map(&:str_content).join
|
||||||
when :const
|
when :const
|
||||||
node.const_name
|
node.const_name
|
||||||
when :sym
|
when :sym
|
||||||
|
|||||||
@ -148,7 +148,7 @@ describe "download strategies", :cask do
|
|||||||
"DBw2KdR24q9t1wfjS9LUzelf5TWk6ojj8p9%2FHjl%2Fi%2FVCXN",
|
"DBw2KdR24q9t1wfjS9LUzelf5TWk6ojj8p9%2FHjl%2Fi%2FVCXN",
|
||||||
"N4o1mW%2FMayy2tTY1qcC%2FTmqI1ulZS8SNuaSgr9Iys9oDF1%2",
|
"N4o1mW%2FMayy2tTY1qcC%2FTmqI1ulZS8SNuaSgr9Iys9oDF1%2",
|
||||||
"BPK%2B4Sg==",
|
"BPK%2B4Sg==",
|
||||||
].join("")
|
].join
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#tarball_path" do
|
describe "#tarball_path" do
|
||||||
|
|||||||
@ -20,7 +20,7 @@ describe Hbc::DSL, :cask do
|
|||||||
}
|
}
|
||||||
|
|
||||||
it "prints a warning that it has encountered an unexpected method" do
|
it "prints a warning that it has encountered an unexpected method" do
|
||||||
expected = Regexp.compile(<<~EOS.lines.map(&:chomp).join(""))
|
expected = Regexp.compile(<<~EOS.lines.map(&:chomp).join)
|
||||||
(?m)
|
(?m)
|
||||||
Warning:
|
Warning:
|
||||||
.*
|
.*
|
||||||
|
|||||||
@ -134,7 +134,7 @@ describe Hbc::Pkg, :cask do
|
|||||||
<string>#{volume}</string>
|
<string>#{volume}</string>
|
||||||
<key>paths</key>
|
<key>paths</key>
|
||||||
<dict>
|
<dict>
|
||||||
#{(pkg_files + pkg_directories).map { |f| "<key>#{f}</key><dict></dict>" }.join("")}
|
#{(pkg_files + pkg_directories).map { |f| "<key>#{f}</key><dict></dict>" }.join}
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@ -109,7 +109,7 @@ describe Hbc::SystemCommand, :cask do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "echoes only STDOUT" do
|
it "echoes only STDOUT" do
|
||||||
expected = [1, 3, 5].map { |i| "#{i}\n" }.join("")
|
expected = [1, 3, 5].map { |i| "#{i}\n" }.join
|
||||||
expect {
|
expect {
|
||||||
described_class.run(command, options)
|
described_class.run(command, options)
|
||||||
}.to output(expected).to_stdout
|
}.to output(expected).to_stdout
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user