Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (20 sloc) 533 Bytes
require "minitest/autorun"
require "stringio"
require "tmpdir"
ENV["ORG"] = "ferret-test"
ENV["XID"] = "deadbeef"
$logdevs = [StringIO.new]
require_relative "../lib/ferret"
class TestBase < MiniTest::Unit::TestCase
def setup
ENV["TEMP_DIR"] = Dir.mktmpdir
$logdevs[0].rewind
$logdevs[0].truncate(0)
end
def logs
$logdevs[0].rewind
#$logdevs[0].read
#$logdevs[0].read.gsub(/val=[0-9.]+/, "val=X")
$logdevs[0].read.gsub(/val=([0-9]+)\.([0-9]+)/, "val=X.Y") # mask floating point values
end
end