Created
January 16, 2014 05:30
-
-
Save baweaver/8450274 to your computer and use it in GitHub Desktop.
Testing library: Proof. Vague musings on structure.
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 my_function(n); n / 2; end | |
prove x.will eq(5).when { x = my_function(10) } | |
when { x = my_function(10) }.prove_that_it_will eq(5) | |
my_context = ->{ x = my_function(10) } | |
prove(x).will eq(5).when my_context | |
when(&:my_context).prove_that_it_will eq(5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment