Sha256: 26606e485d054546ed9458246548e15a5a1d7a97c22e89ae57d7c3737e2ee9ea
Contents?: true
Size: 1.41 KB
Versions: 24
Compression:
Stored size: 1.41 KB
Contents
Feature: Terminate all commands To terminate all running commands use the `#terminate_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) { terminate_all_commands } it { expect(all_commands).to all be_stopped } end """ When I run `rspec` Then the specs should all pass Scenario: Terminate 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) { terminate_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