Sha256: 520d9bf074a1ba08ecf97c94d3f7b865fd9007f85ed193ff35d9e924408e9aac

Contents?: true

Size: 623 Bytes

Versions: 27

Compression:

Stored size: 623 Bytes

Contents

require 'spec_helper'

module Test
  module Job
    class Compass
      def directions; end
    end

    class Journey < ActiveJob::Base
      include Scorpion::Rails::Job

      depend_on do
        compass Test::Job::Compass
      end

      def perform
        compass.directions
      end
    end
  end
end

describe Scorpion::Rails::Job do
  it "perform has been feed" do
    compass = Test::Job::Compass.new

    Test::Job::Journey.scorpion_nest do |hunter|
      hunter.hunt_for Test::Job::Compass, return: compass
    end

    expect( compass ).to receive( :directions )
    Test::Job::Journey.perform_now
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
scorpion-ioc-0.6.2 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.6.1 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.6.0 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.23 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.22 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.21 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.20 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.19 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.18 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.17 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.16 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.15 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.14 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.13 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.12 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.11 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.10 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.9 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.8 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-0.5.7 spec/lib/scorpion/rails/job_spec.rb