class IOStub

Public Instance Methods

flush() click to toggle source
# File lib/mspec/helpers/io.rb, line 24
def flush
  self
end
print(*str) click to toggle source
printf(format, *args) click to toggle source
# File lib/mspec/helpers/io.rb, line 20
def printf(format, *args)
  self << sprintf(format, *args)
end
puts(*str) click to toggle source
# File lib/mspec/helpers/io.rb, line 12
def puts(*str)
  if str.empty?
    write "\n"
  else
    write(str.collect { |s| s.to_s.chomp }.concat([nil]).join("\n"))
  end
end
write(*str) click to toggle source
# File lib/mspec/helpers/io.rb, line 4
def write(*str)
  self << str.join
end