66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# File 'lib/atig/command/command_helper.rb', line 66
def init(klass)
@log = mock 'log'
@opts = Atig::Option.new({})
context = OpenStruct.new :log=>@log, :opts=>@opts
@channel = mock 'channel'
@gateway = FakeGateway.new @channel
@api = mock 'api'
@statuses = FakeDbEntry.new 'status DB'
@followings = FakeDbEntry.new 'followings DB'
@lists = {
"A" => FakeDbEntry.new('list A'),
"B" => FakeDbEntry.new('list B')
}
@me = user 1,'me'
@db = FakeDb.new @statuses, @followings, @lists, @me
@command = klass.new context, @gateway, FakeScheduler.new(@api), @db
end
|