Skip to content

Commit b5eb26a

Browse files
committed
Add failing test
1 parent 289cecd commit b5eb26a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/exercises/acronym_test.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ def self.abbreviate(words)
1515
assert_equal [], results[:comments]
1616
end
1717

18+
def test_lvar_name_not_tightly_coupled
19+
source = %q{
20+
class Acronym
21+
def self.abbreviate(sentence)
22+
sentence.tr('-', ' ').split.map(&:chr).join.upcase
23+
end
24+
end
25+
}
26+
results = Acronym::Analyze.(source)
27+
assert_equal :approve, results[:status]
28+
assert_equal [], results[:comments]
29+
end
30+
1831
def test_method_chaining_with_block_syntax_passes_with_comment
1932
source = %q{
2033
class Acronym

0 commit comments

Comments
 (0)