Sha256: 7ab45ccb07e67ea4b114a4911178ef6efbbc8fb14925cdd94a1d23a80ef13245

Contents?: true

Size: 1.09 KB

Versions: 19

Compression:

Stored size: 1.09 KB

Contents

require 'spec_helper'

describe Vx::Builder::ScriptBuilder do
  let(:task)   { create :task }
  let(:source) { create :source }
  let(:script) { described_class.new task, source }
  subject { script }

  context "just created" do
    its(:source) { should eq source }
    its(:task)   { should eq task  }
  end

  context "#image" do
    subject { script.image }
    it { should eq 'one' }
  end

  context "vexor" do
    it "should avaialble timeout and read_timeout attributes" do
      expect(script.vexor.timeout).to eq 10
      expect(script.vexor.read_timeout).to eq 20

      simple_source = create :source, name: "simple.yml"
      simple_script = described_class.new task, simple_source
      expect(simple_script.vexor.timeout).to be_nil
      expect(simple_script.vexor.read_timeout).to be_nil
    end

  end

  context "#to_before_script" do
    subject { script.to_before_script }
    it { should be }
  end

  context "#to_after_script" do
    subject { script.to_after_script }
    it { should be }
  end

  context "#to_script" do
    subject { script.to_script }
    it { should be }
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
vx-builder-0.5.7 spec/lib/builder/script_builder_spec.rb
vx-builder-0.5.6 spec/lib/builder/script_builder_spec.rb
vx-builder-0.5.5 spec/lib/builder/script_builder_spec.rb
vx-builder-0.5.4 spec/lib/builder/script_builder_spec.rb
vx-builder-0.5.3 spec/lib/builder/script_builder_spec.rb
vx-builder-0.5.2 spec/lib/builder/script_builder_spec.rb
vx-builder-0.5.1 spec/lib/builder/script_builder_spec.rb
vx-builder-0.5.0 spec/lib/builder/script_builder_spec.rb
vx-builder-0.4.0 spec/lib/builder/script_builder_spec.rb
vx-builder-0.3.14 spec/lib/builder/script_builder_spec.rb
vx-builder-0.3.13 spec/lib/builder/script_builder_spec.rb
vx-builder-0.3.12 spec/lib/builder/script_builder_spec.rb
vx-builder-0.3.11 spec/lib/builder/script_builder_spec.rb
vx-builder-0.3.10 spec/lib/builder/script_builder_spec.rb
vx-builder-0.3.9 spec/lib/builder/script_builder_spec.rb
vx-builder-0.3.8 spec/lib/builder/script_builder_spec.rb
vx-builder-0.3.7 spec/lib/builder/script_builder_spec.rb
vx-builder-0.3.6 spec/lib/builder/script_builder_spec.rb
vx-builder-0.3.5 spec/lib/builder/script_builder_spec.rb