cartodb/services/importer/spec/doubles/log.rb

38 lines
648 B
Ruby
Raw Normal View History

2020-06-15 10:58:47 +08:00
module CartoDB
module Importer2
module Doubles
class Log
def initialize(user)
@user = user
clear
end
# We wil ignore params in testing
def append(message, truncate = nil, timestamp = nil)
@log << message.to_s
end
def append_and_store(content, truncate = nil, timestamp = nil)
append(content, truncate, timestamp)
end
def to_s
@log
end
def clear
@log = ''
end
def store
nil
end
def user_id
@user.id
end
end
end
end
end