Sha256: 9a1f682ac16b40f0ab7a0bff3390ca1f35911a7c04f32995df59e1494b675f0e
Contents?: true
Size: 932 Bytes
Versions: 1
Compression:
Stored size: 932 Bytes
Contents
dir = File.dirname(File.expand_path(__FILE__)) $LOAD_PATH.unshift dir + '/../lib' $TESTING = true require 'rubygems' require 'minitest/unit' require 'minitest/pride' require 'simplecov' SimpleCov.start do add_filter '/test/' end unless RUBY_PLATFORM == 'java' require 'resque-lock-timeout' require dir + '/test_jobs' # make sure we can run redis if !system('which redis-server') puts '', "** can't find `redis-server` in your path" puts '** try running `sudo rake install`' abort '' end # start our own redis when the tests start, # kill it when they end at_exit do next if $! exit_code = MiniTest::Unit.new.run(ARGV) pid = `ps -e -o pid,command | grep [r]edis-test`.split(' ')[0] puts 'Killing test redis server...' `rm -f #{dir}/dump.rdb` `kill -9 #{pid}` exit(exit_code) end puts 'Starting redis for testing at localhost:9736...' `redis-server #{dir}/redis-test.conf` Resque.redis = '127.0.0.1:9736'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
resque-lock-timeout-0.3.3 | test/test_helper.rb |