Created
September 14, 2011 04:16
-
-
Save mwotton/1215839 to your computer and use it in GitHub Desktop.
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
def magic() | |
raise "not defined" | |
end | |
def foobar(bar, baz) | |
"#{bar} is definitely not a #{baz}" | |
end | |
def quux(bar, baz, bahooey) | |
"Whereas #{bar} and #{baz} might be #{bahooey}" | |
end | |
strings = %w{some samples} | |
strings.map(&magic(foobar("first"))).should == | |
["first is definitely not a some", "first is definitely not a samples"] | |
strings.map(&magic(quux("first", "second"))).should == | |
["Whereas first and second might me some", | |
"Whereas first and second might me samples"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment