Sha256: 39a40e5028ca3d30fbe363022cab38fcc77185e2b3e52286f8103c4743d205ea

Contents?: true

Size: 878 Bytes

Versions: 65

Compression:

Stored size: 878 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 do
        stub(env.source).install { [] }
        run
      end

      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

65 entries across 65 versions & 1 rubygems

Version Path
vx-builder-0.5.61 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.60 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.59 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.58 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.57 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.56 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.55 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.54 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.53 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.52 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.51 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.50 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.49 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.48 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.47 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.46 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.45 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.44 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.43 spec/lib/builder/script_builder/ruby_spec.rb
vx-builder-0.5.42 spec/lib/builder/script_builder/ruby_spec.rb