Last active
August 29, 2015 14:20
-
-
Save gilesbowkett/b18af441e81747f10143 to your computer and use it in GitHub Desktop.
what's the best way to satisfy this Midje test?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(facts "about finding sub-words" | |
(fact "(sub-words) finds all possible sub-words" | |
(sub-words "monocarp") => ["mono", | |
"monoc", | |
"monoca", | |
"monocar", | |
"onoc", | |
"onoca", | |
"onocar", | |
"onocarp", | |
"noca", | |
"nocar", | |
"nocarp", | |
"ocar", | |
"ocarp", | |
"carp"])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
But even in your example, if you find yourself
filter
ing the results of afor
then you might sometimes look at using:let
and:when
.