Sha256: 9334a7463d5b96272175ad8971b5bf3287446ce997bbc046284cfb03c9c8d39d

Contents?: true

Size: 1021 Bytes

Versions: 4

Compression:

Stored size: 1021 Bytes

Contents

require 'test/unit'
require 'yaml'
begin
    require File.join(File.dirname(__FILE__), '../lib/simple_worker')
rescue Exception => ex
    puts ex.message
    require 'simple_worker'
end
require File.join(File.dirname(__FILE__), "./test_worker")
require File.join(File.dirname(__FILE__), "./test_worker_2")
require File.join(File.dirname(__FILE__), "./test_worker_3")

class TestBase < Test::Unit::TestCase

    def setup
        @config = YAML::load(File.open(File.expand_path("~/.test-configs/simple_worker.yml")))
        #puts @config.inspect
        @access_key = @config['simple_worker']['access_key']
        @secret_key = @config['simple_worker']['secret_key']

        @worker = SimpleWorker::Service.new(@access_key, @secret_key)
        @worker.host = "http://localhost:3000/api/"

        # new style
        SimpleWorker.configure do |config|
            config.access_key = @access_key
            config.secret_key = @secret_key
            config.host = "http://localhost:3000/api/"
        end
    end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
simple_worker-0.3.14 test/test_base.rb
simple_worker-0.3.13 test/test_base.rb
simple_worker-0.3.11 test/test_base.rb
simple_worker-0.3.10 test/test_base.rb