Skip to content
Browse files

add wip feature for halt

  • Loading branch information...
1 parent b8ddd84 commit c6285ad5c6b66a0b99a4d5d8bc21447381c5c2ed @dchelimsky dchelimsky committed
Showing with 27 additions and 0 deletions.
  1. +27 −0 features/hooks/halt.feature
View
27 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.
Something went wrong with that request. Please try again.