请指导如何使用 RSpec 禁用以下测试方法之一。我正在使用 Selenuim WebDriver + RSpec 组合来运行测试。
require 'rspec'
require 'selenium-webdriver'
describe 'Automation System' do
before(:each) do
###
end
after(:each) do
@driver.quit
end
it 'Test01' do
#positive test case
end
it 'Test02' do
#negative test case
end
end
您可以使用pending() https://relishapp.com/rspec/rspec-core/v/2-0/docs/pending/pending-examples或改变it
to xit
或将断言包装在挂起块中以进行等待实现:
describe 'Automation System' do
# some code here
it 'Test01' do
pending("is implemented but waiting")
end
it 'Test02' do
# or without message
pending
end
pending do
"string".reverse.should == "gnirts"
end
xit 'Test03' do
true.should be(true)
end
end
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)