Created
June 5, 2009 02:42
-
-
Save moro/124009 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
Spec::Example::ExampleMethods.module_eval do | |
def description | |
if description = @_proxy.description || ::Spec::Matchers.generated_description | |
description | |
else | |
"(no description supplied at %s)" % @_proxy.location | |
end | |
end | |
end | |
describe "on handling no description error" do | |
subject{ nil } | |
context "on raise in example" do | |
it{ raise } | |
end | |
context "on pass through" do | |
it{ should be_nil } | |
end | |
context "on not using subject" do | |
it{ nil.should be_empty } | |
end | |
context "on nameless matcher" do | |
it{ [].should satisfy{|a| !!a } } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment