Skip to content

Instantly share code, notes, and snippets.

@askl56

askl56/specs.rb Secret

Created November 28, 2015 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save askl56/8304daed8ab824cd94aa to your computer and use it in GitHub Desktop.
Save askl56/8304daed8ab824cd94aa to your computer and use it in GitHub Desktop.
Test.assert_equals(get_count('Test'),{"vowels"=>1,"consonants"=>3},'Should return 1 vowel and 3 consonants')
Test.assert_equals(get_count('Here is some text'),{"vowels"=>6,"consonants"=>8},'Should return 6 vowel and 8 consonants')
Test.assert_equals(get_count('To be a Codewarrior or not to be'),{"vowels"=>12,"consonants"=>13},'Should return 12 vowel and 20 consonants')
Test.assert_equals(get_count('To Kata or not to Kata'),{"vowels"=>8,"consonants"=>9},'Should return 8 vowel and 9 consonants')
Test.assert_equals(get_count('aeiou'),{"vowels"=>5,"consonants"=>0},'Should return 5 vowel and 0 consonants')
Test.assert_equals(get_count('TEst'),{"vowels"=>1,"consonants"=>3},'Should return 1 vowel and 3 consonants')
Test.assert_equals(get_count('HEre Is sOme text'),{"vowels"=>6,"consonants"=>8},'Should return 6 vowel and 8 consonants')
Test.assert_equals(get_count(),{"vowels"=>0,"consonants"=>0},'Should return 0 vowel and 0 consonants')
Test.assert_equals(get_count(['To Kata or not to Kata']),{"vowels"=>0,"consonants"=>0},'Should return 0 vowel and 0 consonants')
Test.assert_equals(get_count(nil),{"vowels"=>0,"consonants"=>0},'Should return 5 vowel and 0 consonants')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment