Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

rdoc - add note about pending + before

  • Loading branch information...
commit 59602fa2375a5447f9b7be593f6c1ea94e4fa10e 1 parent b624a00
@dchelimsky dchelimsky authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/rspec/core/pending.rb
View
9 lib/rspec/core/pending.rb
@@ -46,6 +46,15 @@ class PendingDeclaredInExample < StandardError; end
# end
# end
# end
+ #
+ # @note `before(:each)` hooks are eval'd when you use the `pending`
+ # method within an example. If you want to declare an example `pending`
+ # and bypass the `before` hooks as well, you can pass `:pending => true`
+ # to the `it` method:
+ #
+ # it "does something", :pending => true do
+ # # ...
+ # end
def pending(*args)
return self.class.before(:each) { pending(*args) } unless example
Please sign in to comment.
Something went wrong with that request. Please try again.