Sha256: 556014e36724d3b939f8497a40c8bdb851dfff7dfc43dd8bb56f46f29ac69d1b

Contents?: true

Size: 1011 Bytes

Versions: 34

Compression:

Stored size: 1011 Bytes

Contents

require 'rspec/expectations/version'

require 'aruba/matchers/command/have_exit_status'
require 'aruba/matchers/command/have_finished_in_time'

# @!method be_successfuly_executed
#   This matchers checks if execution of <command> was successful
#
#   @return [TrueClass, FalseClass] The result
#
#     false:
#     * if command was not successful
#     true:
#     * if command was successful
#
#   @example Use matcher
#
#     RSpec.describe do
#       it { expect(last_command_started).to be_successfully_executed }
#       it { expect(last_command_started).not_to be_successfully_executed }
#       it { expect(last_command_started).to have_failed_running }
#     end
RSpec::Matchers.define :be_successfully_executed do
  match do |actual|
    @old_actual = actual
    @actual     = @old_actual.commandline

    expect(@old_actual).to have_exit_status(0)
  end
end

if RSpec::Expectations::Version::STRING >= '3.1'
  RSpec::Matchers.define_negated_matcher :have_failed_running, :be_successfully_executed
end

Version data entries

34 entries across 34 versions & 3 rubygems

Version Path
aruba-0.14.14 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-0.14.13 lib/aruba/matchers/command/be_successfully_executed.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/aruba-0.14.12/lib/aruba/matchers/command/be_successfully_executed.rb
aruba-0.14.12 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-0.14.11 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-0.14.10 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-0.14.9 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-0.14.8 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-0.14.7 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-0.14.6 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-0.14.5 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-0.14.4 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-0.14.3 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-1.0.0.pre.alpha.2 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-1.0.0.pre.alpha.1 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-win-fix-0.14.2 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-0.14.2 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-0.14.1 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-0.14.0 lib/aruba/matchers/command/be_successfully_executed.rb
aruba-0.13.0 lib/aruba/matchers/command/be_successfully_executed.rb