Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,24 @@
include :assert
palindrome? = { str |
str = str.downcase.sub /\s+/ ""
str == str.reverse
}
setup name: "palindrome test" {
test "is a palindrome" {
assert { palindrome? "abba" }
}
test "is not a palindrome" {
assert_false { palindrome? "abb" }
}
test "is not a string" {
assert_fail { palindrome? 1001 }
}
test "this test fails" {
assert { palindrome? "blah blah" }
}
}