Sha256: d4a8649533e4be6ab490b163dbd96a6523729b968c3abfef3ee83385d47f83a6

Contents?: true

Size: 1.46 KB

Versions: 7

Compression:

Stored size: 1.46 KB

Contents

Feature: Return last command started

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

  Scenario: A command has been started
    Given a file named "spec/run_spec.rb" with:
    """ruby
    require 'spec_helper'

    RSpec.describe 'Run command', :type => :aruba do
      before(:each) { run_command('echo hello') }
      before(:each) { stop_all_commands }

      it { expect(last_command_started).to be_successfully_executed }
      it { expect(last_command_started.commandline).to eq 'echo hello' }
    end
    """
    When I run `rspec`
    Then the specs should all pass

  Scenario: Multiple commands have been started
    Given a file named "spec/run_spec.rb" with:
    """ruby
    require 'spec_helper'

    RSpec.describe 'Run command', :type => :aruba do
      before(:each) { run_command('echo hello') }
      before(:each) { run_command('echo world') }

      before(:each) { stop_all_commands }

      it { expect(last_command_started).to be_successfully_executed }
      it { expect(last_command_started.commandline).to eq 'echo world' }
    end
    """
    When I run `rspec`
    Then the specs should all pass

  Scenario: No command has been started
    Given a file named "spec/run_spec.rb" with:
    """ruby
    require 'spec_helper'

    RSpec.describe 'Run command', :type => :aruba do
      it { expect{ last_command_started.commandline }.to raise_error Aruba::NoCommandHasBeenStartedError }
    end
    """
    When I run `rspec`
    Then the specs should all pass

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
aruba-0.14.14 features/04_aruba_api/command/use_last_command_started.feature
aruba-0.14.13 features/04_aruba_api/command/use_last_command_started.feature
aruba-0.14.12 features/04_aruba_api/command/use_last_command_started.feature
aruba-0.14.11 features/04_aruba_api/command/use_last_command_started.feature
aruba-0.14.10 features/04_aruba_api/command/use_last_command_started.feature
aruba-0.14.9 features/api/command/last_command_started.feature
aruba-0.14.8 features/api/command/last_command_started.feature