Created
February 24, 2010 08:55
-
-
Save cyx/313258 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
module Sinefunc | |
module SpecHelpers | |
module Sugar | |
def its(attribute, &block) | |
describe(attribute) do | |
define_method(:subject) { super().send(attribute) } | |
it(&block) | |
end | |
end | |
end | |
end | |
end | |
end | |
Rspec.configure { |c| c.extend Sinefunc::SpecHelpers::Sugar } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment