Sha256: f11d27cbd7b11710e11371f6c680c47366e2af668f882272645e0a9ca9e8bccf
Contents?: true
Size: 1010 Bytes
Versions: 16
Compression:
Stored size: 1010 Bytes
Contents
require 'spec_helper' require 'tmpdir' require 'fileutils' describe Vx::Builder::ScriptBuilder::Prepare do let(:app) { ->(_) { 0 } } let(:script) { described_class.new app } let(:env) { create :env } let(:run) { script.call env } let(:path) { Dir.tmpdir } subject { run } before { FileUtils.rm_rf(path) } after { FileUtils.rm_rf(path) } it { should eq 0 } context "run it", git: true do let(:command) { create :command_from_env, env: env } before { run } context "success" do it "should return zero code" do Dir.chdir(path) do system( command ) end expect($?.to_i).to eq 0 end end context "with github pull request" do let(:env) { create :env, task: create(:task, pull_request_id: 1) } context "success" do it "should return zero code" do Dir.chdir(path) do system( command ) end expect($?.to_i).to eq 0 end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems