From 2ea1db760835a4db9f32e1a6c956ca40b318b680 Mon Sep 17 00:00:00 2001 From: "victor.brender" Date: Thu, 14 Apr 2016 16:29:12 +0200 Subject: [PATCH] Add more tests Some implementations use the "/\w/" regex to match characters and add them to an array and then check that the size of the array is equal to 26. These implementations erroneously pass the current test suite. --- exercises/pangram/pangram_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/exercises/pangram/pangram_test.rb b/exercises/pangram/pangram_test.rb index c796d4b887..cfb2334796 100755 --- a/exercises/pangram/pangram_test.rb +++ b/exercises/pangram/pangram_test.rb @@ -19,6 +19,16 @@ def test_pangram_with_only_lower_case assert Pangram.is_pangram?(str) end + def test_pangram_with_underscore_character + str = 'the quick brown_fox jumps over the lazy dog' + assert Pangram.is_pangram?(str) + end + + def test_pangram_with_sentence_containing_numbers + str = 'the qu1ck br0wn fox jumps over the lazy dog' + refute Pangram.is_pangram?(str) + end + def test_missing_character_x skip str = 'a quick movement of the enemy will jeopardize five gunboats'