allow scenarios to be pending
This commit is contained in:
parent
e73628d558
commit
4da53be6af
|
@ -149,11 +149,16 @@ feature "Signing up" do
|
||||||
click_link 'Sign in'
|
click_link 'Sign in'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
xscenario "Signing out" do
|
||||||
|
# this test is pending
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
`feature` is in fact just an alias for `describe ..., :type => :request`,
|
`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.
|
`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
|
## Using Capybara with Test::Unit
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ module Capybara
|
||||||
base.instance_eval do
|
base.instance_eval do
|
||||||
alias :background :before
|
alias :background :before
|
||||||
alias :scenario :it
|
alias :scenario :it
|
||||||
|
alias :xscenario :pending
|
||||||
alias :given :let
|
alias :given :let
|
||||||
alias :given! :let!
|
alias :given! :let!
|
||||||
end
|
end
|
||||||
|
|
|
@ -50,6 +50,11 @@ feature "given and given! aliases to let and let!" do
|
||||||
end
|
end
|
||||||
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
|
feature "Capybara's feature DSL with driver", :driver => :culerity do
|
||||||
scenario "switches driver" do
|
scenario "switches driver" do
|
||||||
Capybara.current_driver.should == :culerity
|
Capybara.current_driver.should == :culerity
|
||||||
|
|
Loading…
Reference in New Issue