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

38 lines
648 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +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