Sha256: dca4bb6672b9e280b74890d9ba70d99183cdbe7c1a29fd334016bfa9a488f763

Contents?: true

Size: 1.12 KB

Versions: 3

Compression:

Stored size: 1.12 KB

Contents

require 'test/unit'
require 'yaml'
begin
  require File.join(File.dirname(__FILE__), '../lib/simple_worker')
rescue Exception => ex
  puts "Could NOT load current simple_worker: " + ex.message
  require 'simple_worker'
end
require_relative "test_worker"
require_relative "test_worker_2"
require_relative "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']

    # new style
    SimpleWorker.configure do |config|
      config.access_key                   = @access_key
      config.secret_key                   = @secret_key
#            config.host = "http://localhost:3000/api/"
      config.global_attributes["db_user"] = "sa"
      config.global_attributes["db_pass"] = "pass"
      config.database = {
          :adapter  => "mysql2",
          :host     => "localhost",
          :database => "appdb",
          :username => "appuser",
          :password => "secret"
      }

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
simple_worker-0.3.24 test/test_base.rb
simple_worker-0.3.23 test/test_base.rb
simple_worker-0.3.22 test/test_base.rb