Sha256: 1abe1b89cc2819f7b8ccfd2be7ee2b2becd0ce8f24885763c8c7fd8a92fbea31

Contents?: true

Size: 623 Bytes

Versions: 9

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

9 entries across 9 versions & 1 rubygems

Version Path
scorpion-ioc-1.0.10 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-1.0.8 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-1.0.7 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-1.0.6 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-1.0.4 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-1.0.3 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-1.0.2 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-1.0.1 spec/lib/scorpion/rails/job_spec.rb
scorpion-ioc-1.0.0 spec/lib/scorpion/rails/job_spec.rb