Sha256: e8728e3627db11d1f0a3057eb18cfac2d62eb30223f42637065ebded83238c95

Contents?: true

Size: 672 Bytes

Versions: 28

Compression:

Stored size: 672 Bytes

Contents

require 'spec_helper'
require 'tmpdir'
require 'fileutils'

describe Vx::Builder::Script::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" 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
  end

end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
vx-builder-0.1.3 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.1.2 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.1.1 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.1.0 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.29 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.28 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.27 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.26 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.25 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.24 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.23 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.22 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.21 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.20 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.19 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.18 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.16 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.15 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.14 spec/lib/builder/script/prepare_spec.rb
vx-builder-0.0.13 spec/lib/builder/script/prepare_spec.rb