Created
December 11, 2011 15:24
-
-
Save dchelimsky/1461106 to your computer and use it in GitHub Desktop.
Interaction between pending and before hooks in RSpec
This file contains 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
describe Something do | |
before(:each) do | |
do_something_before | |
end | |
it "does one thing" do | |
# before will run for this example because rspec doesn't know it is pending | |
# until the example is eval'd | |
pending | |
end | |
it "does something else", :pending => true do | |
# before will _not_ run for this example | |
end | |
pending "does yet another thing" do | |
# before will _not_ run for this example | |
end | |
end |
pending "does yet another thing", message: "waiting on card 353" do
end
it "does one thing", :pending=>'waiting on card 353; do
end
If only we had the source code available so we could add the feature!
@jbrains - rspec/rspec-core#540 - please feel free to add commentary and/or enable notifications on that issue.
@zspencer - ha!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can I give
:pending
a message instead oftrue
/false
? I guess any non-nil
string would betrue
.