How do you mark a Cucumber Scenario as Pending

后端 未结 4 692
面向向阳花
面向向阳花 2020-12-16 08:51

How do I mark a cucumber scenario as pending so it doesn\'t get counted as a passed?

Scenario: Guest should not see edit link
# pending implementation
         


        
4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-16 09:55

    In addition to averell's answer, you can exclude scenario tags when running cucumber.

    If @todo and @wip are tags you want to use for scenarios that are work in process or just mark pending scenarios, run your features like:

    cucumber --tags ~@todo --tags ~@wip

    If you're using Guard do something like this:

    guard 'cucumber', :notification => true, :all_on_start => true,
                          :cmd => "bundle exec cucumber", 
                          :cli => "--tags ~@todo --tags ~@wip" do
       watch(%r{^features/.+\.feature$})
       watch(%r{^features/support/.+$})  { 'features' }
       watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
         Dir[File.join("**/#{m[1]}.feature")][0] || 'features'
       end
    end
    

提交回复
热议问题