Skip to content

Commit

Permalink
add wip feature for halt
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Feb 12, 2010
1 parent b8ddd84 commit c6285ad
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions features/hooks/halt.feature
@@ -0,0 +1,27 @@
Feature: halt

In an example, before hook, after hook, or around hook, you can
halt the current example, group, or suite based on arbitrary
criteria.

@wip
Scenario: halt group on failure
Given a directory named "spec"
And a file named "spec/example_spec.rb" with:
"""
Rspec.configure do |c|
c.after(:each) do
running_example.halt(:group, :status => 'failed')
end
end
describe "something" do
it "fails" do
fail
end
it "does not run this example" do
end
end
"""
When I run "rspec spec/example_spec.rb"
Then the stdout should match "1 example, 1 failure"

0 comments on commit c6285ad

Please sign in to comment.