Sha256: c3d27d420debe2d6689d310239e4dd89798b89b061312a272e496c7028b749cb
Contents?: true
Size: 747 Bytes
Versions: 2
Compression:
Stored size: 747 Bytes
Contents
# @!method have_output_on_stderr # This matchers checks if <command> has created output on stderr # # @return [Boolean] The result # # false: # * if command has not created output on stderr # true: # * if command created output on stderr # # @example Use matcher # # RSpec.describe do # it { expect(last_command_started).to have_output_on_stderr } # end RSpec::Matchers.define :have_output_on_stderr do |expected| match do |actual| @old_actual = actual next false unless @old_actual.respond_to? :stderr @old_actual.stop @actual = sanitize_text(actual.stderr) values_match?(expected, @actual) end diffable description { "have output on stderr: #{description_of expected}" } end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aruba-1.0.0.pre.alpha.4 | lib/aruba/matchers/command/have_output_on_stderr.rb |
aruba-1.0.0.pre.alpha.3 | lib/aruba/matchers/command/have_output_on_stderr.rb |