Sha256: bd735b3b83dd8c7ad65eb5f4652664b7b21b292af6d6c00b274ddcd0be8cc91a
Contents?: true
Size: 992 Bytes
Versions: 4
Compression:
Stored size: 992 Bytes
Contents
require 'spec_helper' require 'pathname' require 'fileutils' describe Evrone::CI::Worker::LocalCreateDirs do let(:app) { ->(_) { 0 } } let(:job) { create :job } let(:path_prefix) { Pathname.new '/tmp/.ci' } let(:env) { OpenStruct.new job: job, path_prefix: path_prefix } let(:mid) { described_class.new app } subject { mid.call env } after do FileUtils.rm_rf path_prefix end it { should eq 0 } context "create and assign directories" do before do subject end it "work_dir" do expect(env.work_dir.to_s).to eq '/tmp/.ci/work/evrone/test-repo' expect(File.directory? env.work_dir).to be end it "tmp_dir" do expect(env.tmp_dir.to_s).to eq '/tmp/.ci/tmp/evrone/test-repo' expect(File.directory? env.tmp_dir).to be end it "repo_dir" do expect(env.repo_dir.to_s).to eq '/tmp/.ci/repo/evrone/test-repo' expect(File.directory? env.repo_dir).to be end end end
Version data entries
4 entries across 4 versions & 1 rubygems