Permalink
Browse files

allow scenarios to be pending

  • Loading branch information...
1 parent e73628d commit 4da53be6afc9f69621e13ee9bac69a637be8fade @koriroys koriroys committed Oct 25, 2012
Showing with 11 additions and 0 deletions.
  1. +5 −0 README.md
  2. +1 −0 lib/capybara/rspec/features.rb
  3. +5 −0 spec/rspec/features_spec.rb
View
@@ -149,11 +149,16 @@ feature "Signing up" do
click_link 'Sign in'
end
+ xscenario "Signing out" do
+ # this test is pending
+ end
+
end
```
`feature` is in fact just an alias for `describe ..., :type => :request`,
`background` is an alias for `before`, `scenario` for `it`, and `given`/`given!` aliases for `let`/`let!`, respectively.
+`xscenario` is an alias for `pending`, allowing you to temporarily disable a test.
## Using Capybara with Test::Unit
@@ -4,6 +4,7 @@ def self.included(base)
base.instance_eval do
alias :background :before
alias :scenario :it
+ alias :xscenario :pending
alias :given :let
alias :given! :let!
end
@@ -50,6 +50,11 @@
end
end
+feature "if xscenario aliases to pending then" do
+ xscenario "this test should be pending" do
+ end
+end
+
feature "Capybara's feature DSL with driver", :driver => :culerity do
scenario "switches driver" do
Capybara.current_driver.should == :culerity

0 comments on commit 4da53be

Please sign in to comment.