module ExtendedLogger::Assertions

Private Instance Methods

nothing_written?() click to toggle source
# File lib/extended_logger/extended_logger.rb, line 78
def nothing_written?
  written? ''
end
written?(expected_data) click to toggle source
# File lib/extended_logger/extended_logger.rb, line 82
def written? expected_data
  device.rewind
  actual_data = device.read

  case expected_data
  when Regexp then expected_data.match actual_data
  else actual_data == expected_data.to_s
  end
end