Sha256: 857b23a222d8dcddd14bc8e28da05b57c178b351005f21bcc10f61615ad6fb7a
Contents?: true
Size: 987 Bytes
Versions: 4
Compression:
Stored size: 987 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).to be_successfully_executed } # it { expect(last_command).not_to be_successfully_executed } # it { expect(last_command).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
4 entries across 4 versions & 1 rubygems