Skip to content

Instantly share code, notes, and snippets.

@asterite
Created November 30, 2014 15:23
Show Gist options
  • Save asterite/0a40ce50e43706b403bd to your computer and use it in GitHub Desktop.
Save asterite/0a40ce50e43706b403bd to your computer and use it in GitHub Desktop.
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