Created
November 30, 2014 15:23
-
-
Save asterite/0a40ce50e43706b403bd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
struct Spec::Expect(T) | |
def initialize(@obj : T) | |
end | |
def to(expectation, file = __FILE__, line = __LINE__) | |
@obj.should(expectation, file, line) | |
end | |
def to_not(expectation, file = __FILE__, line = __LINE__) | |
@obj.should_not(expectation, file, line) | |
end | |
end | |
def expect(obj) | |
Spec::Expect.new(obj) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment