【问题标题】:How do you run a single capybara test that uses the selenium driver?如何运行使用 selenium 驱动程序的单个 capybara 测试?
【发布时间】:2013-02-11 22:59:56
【问题描述】:

有很多示例可以使用 rspec、selenium 和 capybara 来运行这样开始的测试:

it "does something", :js => true do

您可以通过运行“rake spec”来运行所有内容,但是如何运行单个 capybara/selenium 测试?我一辈子都想不通。

【问题讨论】:

标签: selenium rspec capybara


【解决方案1】:

你可以tag an example:

it "does something", :js => true, :focus => true do

$ rspec . --tag focus

或者你可以specify the line number of the spec:

$ rspec my_spec.rb:37

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-24
    • 1970-01-01
    • 2019-08-10
    • 2021-11-10
    相关资源
    最近更新 更多