Sha256: de82aa5d47b3ac9ff6e57c6352d928413b6e9b6f10af4efd688866f416dba763

Contents?: true

Size: 1.24 KB

Versions: 1

Compression:

Stored size: 1.24 KB

Contents

Feature: Rerun profile
  In order to concentrate on failing features
  As a Rails developer working with Cucumber
  I want to rerun only failing features

  Scenario: Rerun
    Given I have created a new Rails app and installed cucumber-rails
    And a file named "rerun.txt" with:
      """
      features/rerun_test.feature:2
      features/rerun_test.feature:5
      """
    And a file named "features/rerun_test.feature" with:
      """
      Feature: Rerun test
        Scenario: failing before
          Given fixed now

        Scenario: still failing
          Given broken

        Scenario: always passing
          Given passing
      """
    And a file named "features/step_definitions/rerun_steps.rb" with:
      """
      Given('fixed now') do
        puts 'All fixed now'
      end

      Given('broken') do
        raise "I'm broken"
      end

      Given('passing') do
        puts "I've always been passing"
      end
      """
    When I run `bundle exec cucumber -p rerun`
    Then it should fail with:
      """
      2 scenarios (1 failed, 1 passed)
      2 steps (1 failed, 1 passed)
      """
    And the file "rerun.txt" should not contain "features/rerun_test.feature:2"
    And the file "rerun.txt" should contain "features/rerun_test.feature:5"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cucumber-rails-1.8.0 features/rerun_profile.feature