Sha256: 393e8979eda1998782475f7a0c1a56fb4e9aa13b1614affccf2a5c8f57636259

Contents?: true

Size: 618 Bytes

Versions: 14

Compression:

Stored size: 618 Bytes

Contents

require 'spec_helper'

describe Vx::Worker::Local do
  let(:options) { { } }
  let(:job)     { create :job, options }
  let(:local)   { described_class.new job, nil }
  subject { local }

  context "perform" do
    subject { local.perform }

    before do
      Vx::Worker.config.run = "local"
    end

    it { should eq 0 }

    context "when fail before_script" do
      let(:options) { { before_script: "/bin/false" } }
      it { should eq(-1) }
    end

    context "when fail script" do
      let(:options) { { script: "/bin/false" } }
      it { should satisfy { |n| [1,127].include?(n) } }
    end
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

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