/test/ppane/test_helper/collector.rb

http://github.com/tgunr/passengerpane · Ruby · 15 lines · 12 code · 3 blank · 0 comment · 0 complexity · 03a3284fc46d6bf0d59b8da06554ca82 MD5 · raw file

  1. class Collector
  2. attr_reader :written
  3. def initialize
  4. @written = []
  5. end
  6. def write(string)
  7. @written << string
  8. end
  9. def puts(string)
  10. @written << "#{string}\n"
  11. end
  12. end