From 3e6d01a15b4ac9199b8cdb0b58e703cb80577c88 Mon Sep 17 00:00:00 2001 From: tjkirch Date: Sun, 6 Mar 2011 12:29:15 +0000 Subject: [PATCH] Clarify string length versus line count --- koans/about_strings.rb | 6 ++++-- src/about_strings.rb | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/koans/about_strings.rb b/koans/about_strings.rb index 771ff8b..aa427d4 100644 --- a/koans/about_strings.rb +++ b/koans/about_strings.rb @@ -40,7 +40,8 @@ class AboutStrings < EdgeCase::Koan It was the best of times, It was the worst of times. } - assert_equal __, long_string.size + assert_equal __, long_string.length + assert_equal __, long_string.lines.count end def test_here_documents_can_also_handle_multiple_lines @@ -48,7 +49,8 @@ It was the worst of times. It was the best of times, It was the worst of times. EOS - assert_equal __, long_string.size + assert_equal __, long_string.length + assert_equal __, long_string.lines.count end def test_plus_will_concatenate_two_strings diff --git a/src/about_strings.rb b/src/about_strings.rb index 65738fc..dd13fec 100644 --- a/src/about_strings.rb +++ b/src/about_strings.rb @@ -40,7 +40,8 @@ class AboutStrings < EdgeCase::Koan It was the best of times, It was the worst of times. } - assert_equal __(54), long_string.size + assert_equal __(54), long_string.length + assert_equal __(3), long_string.lines.count end def test_here_documents_can_also_handle_multiple_lines @@ -48,7 +49,8 @@ It was the worst of times. It was the best of times, It was the worst of times. EOS - assert_equal __(53), long_string.size + assert_equal __(53), long_string.length + assert_equal __(2), long_string.lines.count end def test_plus_will_concatenate_two_strings -- 1.8.0.2