Back ported a lot of changes made to the Koans directory.

Evidently, a lot of changes / pull requests were made to the koans
directory and not to the src directory.  Perhaps we should remove the
koans directory entirely from the repo.
This commit is contained in:
Jim Weirich
2011-12-04 02:00:22 -05:00
parent 51acb84736
commit 6592f3d36e
16 changed files with 145 additions and 81 deletions

View File

@@ -84,6 +84,8 @@ class AboutRegularExpressions < EdgeCase::Koan
def test_shortcut_character_classes_are_negated_with_capitals
assert_equal __("the number is "), "the number is 42"[/\D+/]
assert_equal __("space:"), "space: \t\n"[/\S+/]
# ... a programmer would most likely do
assert_equal __(" = "), "variable_1 = 42"[/[^a-zA-Z0-9_]+/]
assert_equal __(" = "), "variable_1 = 42"[/\W+/]
end