class Boxes::Testing::Matchers::WriteToStdoutMatcher

Public Instance Methods

failure_message() click to toggle source
# File lib/boxes/testing/matchers/write_to_stdout_matcher.rb, line 7
def failure_message
  "expected that '#{clean(actual.stdout)}' would be #{clean(expected)}"
end

Private Instance Methods

clean(output) click to toggle source
# File lib/boxes/testing/matchers/write_to_stdout_matcher.rb, line 17
def clean(output)
  output.gsub(/\n/, '\n')
end
match(actual, expected) click to toggle source
# File lib/boxes/testing/matchers/write_to_stdout_matcher.rb, line 13
def match(actual, expected)
  expected == actual.stdout
end