Sha256: a07faa323903c070f6475137d33e92c2b21ee17edec3bf536ebe3ec681708334

Contents?: true

Size: 893 Bytes

Versions: 11

Compression:

Stored size: 893 Bytes

Contents

Feature: After command hooks

  You can configure Aruba to run blocks of code after it has run
  a command. The command will be passed to the block.

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

  Scenario: Run a simple command with an "after(:command)"-hook
    Given a file named "spec/support/hooks.rb" with:
    """
    Aruba.configure do |config|
      config.after :command do |cmd|
        puts "after the run of `#{cmd.commandline}`"
      end
    end
    """
    And a file named "spec/hook_spec.rb" with:
    """
    require 'spec_helper'

    RSpec.describe 'Hooks', :type => :aruba do
      before(:each) { run_simple 'echo running' }

      it { expect(last_command_started.stdout.chomp).to eq 'running' }
    end
    """
    When I run `rspec`
    Then the specs should all pass
    And the output should contain:
    """
    after the run of `echo running`
    """

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
aruba-0.11.0.pre4 features/hooks/after/command.feature
aruba-0.11.0.pre3 features/hooks/after/command.feature
aruba-0.11.0.pre2 features/hooks/after/command.feature
aruba-0.11.0.pre features/hooks/after/command.feature
aruba-0.10.2 features/hooks/after/command.feature
aruba-0.10.1 features/hooks/after/command.feature
aruba-0.10.0 features/hooks/after/command.feature
aruba-0.10.0.pre2 features/hooks/after/command.feature
aruba-0.10.0.pre features/hooks/after/command.feature
aruba-0.9.0 features/hooks/after/command.feature
aruba-0.9.0.pre2 features/hooks/after/command.feature