spec/lib/worker/local_spec.rb in evrone-ci-worker-0.2.0.pre27 vs spec/lib/worker/local_spec.rb in evrone-ci-worker-0.2.0.pre28
- old
+ new
@@ -1,19 +1,19 @@
require 'spec_helper'
-require 'pathname'
-require 'fileutils'
describe Evrone::CI::Worker::Local do
let(:options) { { } }
let(:job) { create :job, options }
- let(:path) { '/tmp/.ci' }
- let(:local) { described_class.new job, path }
+ let(:local) { described_class.new job, nil }
subject { local }
- after { FileUtils.rm_rf path }
-
- context "perform", local_run: true do
+ context "perform" do
subject { local.perform }
+
+ before do
+ Evrone::CI::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) }