Sha256: f68d7f95c5ba98add575d808524328b01a720c37410d013d5fbf583f56d42d8c
Contents?: true
Size: 849 Bytes
Versions: 2
Compression:
Stored size: 849 Bytes
Contents
require 'coveralls' Coveralls.wear! require 'minitest/unit' require 'minitest/autorun' $:<< File.dirname(__FILE__) + "/../lib" require 'localjob' require "mocha/setup" require 'jobs' class LocaljobTestCase < MiniTest::Unit::TestCase protected # This is a method to make sure the logger is set right. def worker(queue) Localjob::Worker.new(queue, logger: logger) end # This is a method to make sure all queues are registred and destroyed after # each teach run. def queue(name = 0x10CA110B) @queues ||= [] queue = Localjob.new(name) @queues << queue queue end def teardown clear_queues end def logger return @logger if @logger output_file = ENV["DEBUG"] ? STDOUT : "/dev/null" @logger = Logger.new(output_file) end def clear_queues @queues.each(&:destroy) if @queues end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
localjob-0.4.1 | test/test_helper.rb |
localjob-0.4.0 | test/test_helper.rb |