Sha256: e88e74d417334c0a270e820bdd1aac3a9ffd183013011206ca31975ef24ec8e7

Contents?: true

Size: 1.18 KB

Versions: 24

Compression:

Stored size: 1.18 KB

Contents

Feature: Check if a timeout occured during command execution

  If you want to check if a command takes to long to finish it's work

  Background:
    Given I use a fixture named "cli-app"

  Scenario: Check if command runs to long
    Given an executable named "bin/cli" with:
    """
    #!/bin/bash
    sleep 1
    """
    And a file named "spec/timeout_spec.rb" with:
    """
    require 'spec_helper'

    RSpec.describe 'Long running command', :type => :aruba do
      before(:each) { aruba.config.exit_timeout = 0 }

      before(:each) { run('cli') }

      it { expect(last_command_started).to run_too_long }
    end
    """
    When I run `rspec`
    Then the specs should all pass

  Scenario: Check if command finishes in time
    Given an executable named "bin/cli" with:
    """
    #!/bin/bash
    exit 0
    """
    And a file named "spec/timeout_spec.rb" with:
    """
    require 'spec_helper'

    RSpec.describe 'Short running command', :type => :aruba do
      before(:each) { aruba.config.exit_timeout = 5 }

      before(:each) { run('cli') }

      it { expect(last_command_started).to have_finished_in_time }
    end
    """
    When I run `rspec`
    Then the specs should all pass

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
aruba-0.14.7 features/matchers/timeouts.feature
aruba-0.14.6 features/matchers/timeouts.feature
aruba-0.14.5 features/matchers/timeouts.feature
aruba-0.14.4 features/matchers/timeouts.feature
aruba-0.14.3 features/matchers/timeouts.feature
aruba-win-fix-0.14.2 features/matchers/timeouts.feature
aruba-0.14.2 features/matchers/timeouts.feature
aruba-0.14.1 features/matchers/timeouts.feature
aruba-0.14.0 features/matchers/timeouts.feature
aruba-0.13.0 features/matchers/timeouts.feature
aruba-0.12.0 features/matchers/timeouts.feature
aruba-0.11.2 features/matchers/timeouts.feature
aruba-0.11.1 features/matchers/timeouts.feature
aruba-0.11.0.pre4 features/matchers/timeouts.feature
aruba-0.11.0.pre3 features/matchers/timeouts.feature
aruba-0.11.0.pre2 features/matchers/timeouts.feature
aruba-0.11.0.pre features/matchers/timeouts.feature
aruba-0.10.2 features/matchers/timeouts.feature
aruba-0.10.1 features/matchers/timeouts.feature
aruba-0.10.0 features/matchers/timeouts.feature