Sha256: c1d6e93411d4ce595f31d829a36cda2b6926b8623b274100876cb592734c7cb2

Contents?: true

Size: 1.38 KB

Versions: 24

Compression:

Stored size: 1.38 KB

Contents

Feature: Stop all commands

  To stop all running commands use the `#stop_all_commands`-method.

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

  Scenario: Multiple commands are running
    Given an executable named "bin/cli" with:
    """bash
    #!/bin/bash
    sleep 3
    """
    And a file named "spec/run_spec.rb" with:
    """ruby
    require 'spec_helper'

    RSpec.describe 'Run command', :type => :aruba, :exit_timeout => 5 do
      before(:each) { run('cli') }
      before(:each) { run('cli') }

      before(:each) { stop_all_commands }

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

  Scenario: Stop all commands for which the block returns true
    Given an executable named "bin/cli" with:
    """bash
    #!/bin/bash
    sleep 1
    """
    And a file named "spec/run_spec.rb" with:
    """ruby
    require 'spec_helper'

    RSpec.describe 'Run command', :type => :aruba, :exit_timeout => 2 do
      before(:each) { @cmd1 = run('cli') }
      before(:each) { @cmd2 = run('cli') }
      before(:each) { @cmd3 = run('sleep 1') }

      before(:each) { stop_all_commands { |c| c.commandline == 'cli' } }

      it { expect(@cmd1).to be_stopped }
      it { expect(@cmd2).to be_stopped }
      it { expect(@cmd3).not_to be_stopped }
    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/api/command/stop_all_commands.feature
aruba-0.14.6 features/api/command/stop_all_commands.feature
aruba-0.14.5 features/api/command/stop_all_commands.feature
aruba-0.14.4 features/api/command/stop_all_commands.feature
aruba-0.14.3 features/api/command/stop_all_commands.feature
aruba-win-fix-0.14.2 features/api/command/stop_all_commands.feature
aruba-0.14.2 features/api/command/stop_all_commands.feature
aruba-0.14.1 features/api/command/stop_all_commands.feature
aruba-0.14.0 features/api/command/stop_all_commands.feature
aruba-0.13.0 features/api/command/stop_all_commands.feature
aruba-0.12.0 features/api/command/stop_all_commands.feature
aruba-0.11.2 features/api/command/stop_all_commands.feature
aruba-0.11.1 features/api/command/stop_all_commands.feature
aruba-0.11.0.pre4 features/api/command/stop_all_commands.feature
aruba-0.11.0.pre3 features/api/command/stop_all_commands.feature
aruba-0.11.0.pre2 features/api/command/stop_all_commands.feature
aruba-0.11.0.pre features/api/command/stop_all_commands.feature
aruba-0.10.2 features/api/command/stop_all_commands.feature
aruba-0.10.1 features/api/command/stop_all_commands.feature
aruba-0.10.0 features/api/command/stop_all_commands.feature