Created
August 9, 2011 20:32
-
-
Save philcrissman/1135120 to your computer and use it in GitHub Desktop.
y_u_no
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
require 'rspec' | |
def something | |
"something" | |
end | |
def y_u_no?(expectation, &block) | |
block.call == expectation | |
end | |
describe "y_u_no" do | |
it "should test if something returns what is expected" do | |
y_u_no?("something"){ something }.should be_true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment