Sha256: 38677b5bc202f895dda97302adcba67f27f91f43255103a0ef390295edcb5ae8

Contents?: true

Size: 821 Bytes

Versions: 11

Compression:

Stored size: 821 Bytes

Contents

require 'spec_helper'

describe Vx::Builder::ScriptBuilder::Ruby do
  let(:app)    { ->(env) { env } }
  let(:script) { described_class.new app }
  let(:env)    { create :env }
  let(:run)    { script.call env }
  subject { run }

  it { should eq env }

  context "run it" do
    let(:command) { create :command_from_env, env: env }
    subject { env }

    context "should be success" do
      before { run }
      its(:before_install)     { should_not be_empty }
      its(:announce)           { should_not be_empty }
      its(:install)            { should_not be_empty }
      its(:cached_directories) {  should eq %w{ ~/.rubygems } }
    end

    context "when script is empty" do
      before do
        env.source.script.clear
        run
      end
      its(:script) { should_not be_empty }
    end


  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
vx-builder-0.3.10 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.3.9 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.3.8 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.3.7 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.3.6 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.3.5 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.3.4 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.3.3 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.3.2 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.3.1 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.3.0 spec/lib/builder/script_builder/ruby_spec.rb