Skip to content

Commit cc85304

Browse files
committed
Align comment paths to website-copy
1 parent f51b21e commit cc85304

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/analyzers/two_fer/analyze.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ module TwoFer
99
missing_default_param: "ruby.two-fer.missing_default_param", # "There is no correct default param - the tests will fail"
1010
incorrect_default_param: "ruby.two-fer.incorrect_default_param", # "You could set the default value to 'you' to avoid conditionals"
1111
reassigning_param: "ruby.two-fer.reassigning_param", # "You don't need to reassign - use the default param"
12-
string_concatenation: "ruby.two-fer.avoid_string_concatenation", # "Rather than using string building, use interpolation"
13-
kernel_format: "ruby.two-fer.avoid_kernel_format", # "Rather than using the format method, use interpolation"
14-
string_format: "ruby.two-fer.avoid_string_format", # "Rather than using string's format/percentage method, use interpolation"
12+
string_concatenation: "ruby.two-fer.string_concatenation", # "Rather than using string building, use interpolation"
13+
kernel_format: "ruby.two-fer.kernel_format", # "Rather than using the format method, use interpolation"
14+
string_format: "ruby.two-fer.string_format", # "Rather than using string's format/percentage method, use interpolation"
1515
}
1616

1717
class Analyze < ExerciseAnalyzer

test/exercises/two_fer_test.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def self.two_fer(name="you")
160160
}
161161
results = TwoFer::Analyze.(source)
162162
assert_equal :approve, results[:status]
163-
assert_equal [{comment: "ruby.two-fer.avoid_string_concatenation", params: {name_variable: :name}}], results[:comments]
163+
assert_equal [{comment: "ruby.two-fer.string_concatenation", params: {name_variable: :name}}], results[:comments]
164164
end
165165

166166
def test_for_kernel_format
@@ -174,7 +174,7 @@ def self.two_fer(name="you")
174174
}
175175
results = TwoFer::Analyze.(source)
176176
assert_equal :approve, results[:status]
177-
assert_equal [{comment: "ruby.two-fer.avoid_kernel_format", params: {name_variable: :name}}], results[:comments]
177+
assert_equal [{comment: "ruby.two-fer.kernel_format", params: {name_variable: :name}}], results[:comments]
178178
end
179179

180180
def test_for_string_format
@@ -188,7 +188,7 @@ def self.two_fer(name="you")
188188
}
189189
results = TwoFer::Analyze.(source)
190190
assert_equal :approve, results[:status]
191-
assert_equal [{comment: "ruby.two-fer.avoid_string_format", params: {name_variable: :name}}], results[:comments]
191+
assert_equal [{comment: "ruby.two-fer.string_format", params: {name_variable: :name}}], results[:comments]
192192
end
193193

194194
def test_conditional_as_boolean

0 commit comments

Comments
 (0)