10 class DummySource < Source
12 attr_accessor :messages
14 def initialize uri, last_date=nil, usual=true, archived=false, id=nil, labels=[]
15 super uri, last_date, usual, archived, id
24 # should contain the number of test messages -1
25 return @messages ? @messages.length - 1 : 0
28 def load_header offset
29 MBox::read_header StringIO.new(raw_header(offset))
32 def load_message offset
33 RMail::Parser.read raw_message(offset)
38 f = StringIO.new(@messages[offset])
39 until f.eof? || (l = f.gets) =~ /^$/
45 def raw_message offset
49 def each_raw_message_line offset
51 f = StringIO.new(@messages[offset])
57 # FIXME: this one was not mentioned in the source documentation, but