/usr/lib/ruby/vendor_ruby/aruba/matchers/string/output_string_eq.rb is in ruby-aruba 0.14.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # @!method output_string_eq(string)
# This matchers checks if the output string of a command includes string.
#
# @param [Integer] status
# The value of the exit status
#
# @return [TrueClass, FalseClass] The result
#
# false:
# * if the output string does not include string
# true:
# * if the output string includes string
#
# @example Use matcher
#
# RSpec.describe do
# it { expect(last_command_started).to have_output output_string_eq string) }
# it { expect(last_command_started).to have_output an_output_string_begin_eq string) }
# end
RSpec::Matchers.define :output_string_eq do |expected|
match do |actual|
@expected = sanitize_text(expected.to_s)
@actual = sanitize_text(actual.to_s)
values_match? @expected, @actual
end
diffable
description { "output string is eq: #{description_of expected}" }
end
if RSpec::Expectations::Version::STRING >= '3.0'
RSpec::Matchers.alias_matcher :an_output_string_being_eq, :output_string_eq
end
|