allow scenarios to be pending

This commit is contained in:
Kori Roys 2012-10-25 01:59:55 -05:00
parent e73628d558
commit 4da53be6af
3 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -4,6 +4,7 @@ module Capybara
base.instance_eval do
alias :background :before
alias :scenario :it
alias :xscenario :pending
alias :given :let
alias :given! :let!
end

View File

@ -50,6 +50,11 @@ feature "given and given! aliases to let and let!" do
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