Skip to content

Instantly share code, notes, and snippets.

@moro
Created June 5, 2009 02:42
Show Gist options
  • Save moro/124009 to your computer and use it in GitHub Desktop.
Save moro/124009 to your computer and use it in GitHub Desktop.
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