Sha256: d532902fbe2b99b4600df4c6ecc47f6ca92f8beebc51de2ad99691fe5b5e35ef

Contents?: true

Size: 968 Bytes

Versions: 6

Compression:

Stored size: 968 Bytes

Contents

Feature: Run command

  To run a command use the `#run`-method.

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

  Scenario: Existing executable
    Given an executable named "bin/cli" with:
    """
    #!/bin/bash
    exit 0
    """
    And a file named "spec/which_spec.rb" with:
    """
    require 'spec_helper'

    RSpec.describe 'Run command', :type => :aruba do
      before(:each) { run('cli') }
      it { expect(last_command).to be_successfully_executed }
    end
    """
    When I run `rspec`
    Then the specs should all pass

  Scenario: Non-existing executable
    Given a file named "bin/cli" does not exist
    And a file named "spec/which_spec.rb" with:
    """
    require 'spec_helper'

    RSpec.describe 'Find path for command', :type => :aruba do
      it { expect { run('cli') }.to raise_error Aruba::LaunchError, /Command "cli" not found in PATH-variable/ }
    end
    """
    When I run `rspec`
    Then the specs should all pass

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
aruba-0.9.0.pre features/api/command/run.feature
aruba-0.8.1 features/api/command/run.feature
aruba-0.8.0 features/api/command/run.feature
aruba-0.8.0.pre3 features/api/command/run.feature
aruba-0.8.0.pre2 features/api/command/run.feature
aruba-0.8.0.pre features/api/command/run.feature