Sha256: e5664b3eb18f5da308d3f26a9a085c7b7b01f7a36562484cb16ab6a9f9721ea0
Contents?: true
Size: 747 Bytes
Versions: 5
Compression:
Stored size: 747 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../lib/mega_mutex') require 'test/unit/assertions' # Logging::Logger[:root].add_appenders(Logging::Appenders.stdout) module ThreadHelper def abort_on_thread_exceptions before(:all) do @old_abort_on_exception_value = Thread.abort_on_exception Thread.abort_on_exception = true end after(:all) do Thread.abort_on_exception = @old_abort_on_exception_value end end end module ThreadExampleHelper def threads @threads ||= [] end def wait_for_threads_to_finish threads.each{ |t| t.join } end end Spec::Runner.configure do |config| config.extend ThreadHelper config.include ThreadExampleHelper config.include Test::Unit::Assertions end
Version data entries
5 entries across 5 versions & 2 rubygems