Sha256: 44d7eb91edc0496c8f99755d2acc06ce07e407ce694aa5068bb9295a960e00b1

Contents?: true

Size: 343 Bytes

Versions: 14

Compression:

Stored size: 343 Bytes

Contents

require 'yaml'

def create(who, *args)

  options = args.last.is_a?(Hash) ? args.pop : {}

  case who

  when :message
    name  = args.shift
    klass = Vx::Message.const_get name
    klass.test_message options

  when :job
    message = options[:message] || create(:message, 'PerformJob', options)
    Vx::Worker::Job.new message

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
vx-worker-0.3.0.pre1 spec/support/create.rb
vx-worker-0.3.0.pre0 spec/support/create.rb
vx-worker-0.2.1 spec/support/create.rb
vx-worker-0.2.0.pre38 spec/support/create.rb
vx-worker-0.2.0.pre37 spec/support/create.rb
vx-worker-0.2.0.pre36 spec/support/create.rb
vx-worker-0.2.0.pre35 spec/support/create.rb
vx-worker-0.2.0.pre34 spec/support/create.rb
vx-worker-0.2.0.pre33 spec/support/create.rb
vx-worker-0.2.0.pre32 spec/support/create.rb
vx-worker-0.2.0.pre31 spec/support/create.rb
vx-worker-0.2.0.pre30 spec/support/create.rb
vx-worker-0.2.0.pre29 spec/support/create.rb
vx-worker-0.2.0.pre28 spec/support/create.rb