Sha256: b798811896023546765c4045f03c9530fd56c593f21069d42e5943e02089a1de

Contents?: true

Size: 1.29 KB

Versions: 16

Compression:

Stored size: 1.29 KB

Contents

@experimental
Feature: Replace variables

  There are use cases where you need access to some information from aruba in
  your command line. The `#replace_variables`-method makes this information
  available.

  Please note, this feature is experimental for now. The implementation of this
  feature and the name of variables may change without further notice.

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

  Scenario: PID of last command started
    Given an executable named "bin/cli" with:
    """
    #!/bin/bash
    exit 0
    """
    And a file named "spec/replace_spec.rb" with:
    """
    require 'spec_helper'

    RSpec.describe 'Run command', :type => :aruba do
      before(:each) { run('cli') }
      before(:each) { stop_all_commands }
 
      it { expect(replace_variables('<pid-last-command-started>')).to eq last_command_started.pid.to_s }
    end
    """
    When I run `rspec`
    Then the specs should all pass

  Scenario: No last command started
    Given a file named "spec/replace_spec.rb" with:
    """
    require 'spec_helper'

    RSpec.describe 'Run command', :type => :aruba do
      it { expect { replace_variables('<pid-last-command-started>') }.to raise_error Aruba::NoCommandHasBeenStartedError }
    end
    """
    When I run `rspec`
    Then the specs should all pass

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
aruba-0.14.7 features/api/text/replace_variables.feature
aruba-0.14.6 features/api/text/replace_variables.feature
aruba-0.14.5 features/api/text/replace_variables.feature
aruba-0.14.4 features/api/text/replace_variables.feature
aruba-0.14.3 features/api/text/replace_variables.feature
aruba-win-fix-0.14.2 features/api/text/replace_variables.feature
aruba-0.14.2 features/api/text/replace_variables.feature
aruba-0.14.1 features/api/text/replace_variables.feature
aruba-0.14.0 features/api/text/replace_variables.feature
aruba-0.13.0 features/api/text/replace_variables.feature
aruba-0.12.0 features/api/text/replace_variables.feature
aruba-0.11.2 features/api/text/replace_variables.feature
aruba-0.11.1 features/api/text/replace_variables.feature
aruba-0.11.0.pre4 features/api/text/replace_variables.feature
aruba-0.11.0.pre3 features/api/text/replace_variables.feature
aruba-0.11.0.pre2 features/api/text/replace_variables.feature