test/string_test.rb in namna-0.0.3 vs test/string_test.rb in namna-0.0.4
- old
+ new
@@ -1,25 +1,30 @@
require_relative './test_helper'
class TestString < Minitest::Test
def test_constants
assert_equal 26, String::ALPHABET.length
- assert_includes String::ALPHABET, 'a'.namna_sub
- assert_includes String::ALPHABET, 'b'.namna_sub
+ assert_includes String::ALPHABET, 'a'
+ assert_includes String::ALPHABET, 'b'
+
assert_equal 5, String::VOWELS.length
- assert_includes String::VOWELS, 'a'.namna_sub
- refute_includes String::VOWELS, 'b'.namna_sub
+ assert_includes String::VOWELS, 'a'
+ refute_includes String::VOWELS, 'b'
+
assert_equal 21, String::CONSONANTS.length
- assert_includes String::CONSONANTS, 'b'.namna_sub
- refute_includes String::CONSONANTS, 'a'.namna_sub
+ assert_includes String::CONSONANTS, 'b'
+ refute_includes String::CONSONANTS, 'a'
end
def test_namna_sub
assert_equal 'a', 'a'.namna_sub
assert_equal 'b', 'b'.namna_sub
+
assert_includes String::ALPHABET, '?'.namna_sub
+
assert_includes String::VOWELS, '*'.namna_sub
refute_includes String::CONSONANTS, '*'.namna_sub
+
assert_includes String::CONSONANTS, '#'.namna_sub
refute_includes String::VOWELS, '#'.namna_sub
end
end