Sha256: 9d7ee53d2fa7612e62239426a9436e1a65df682c18820b69f7893bd7c34ed6ab

Contents?: true

Size: 828 Bytes

Versions: 89

Compression:

Stored size: 828 Bytes

Contents

describe Terraspace::Hooks::Builder do
  let(:builder) do
    builder = described_class.new(mod, dsl_file, name)
    builder
  end
  let(:mod) do
    mod = double(:mod).as_null_object
    allow(mod).to receive(:cache_dir).and_return("/tmp")
    mod
  end

  context "single" do
    let(:dsl_file) { fixture("terraform/hooks/single.rb") }
    let(:name) { "apply" }
    it "build creates the @hooks structure" do
      hooks = builder.build
      expect(hooks.keys).to include("before")
    end

    it "run_hooks" do
      builder.build
      builder.run_hooks
    end
  end

  context "multiple" do
    let(:dsl_file) { fixture("terraform/hooks/multiple.rb") }
    let(:name) { "apply" }
    it "build creates the @hooks structure" do
      hooks = builder.build
      expect(hooks.keys).to include("before")
    end
  end
end

Version data entries

89 entries across 89 versions & 1 rubygems

Version Path
terraspace-1.0.4 spec/terraspace/hooks/builder_spec.rb
terraspace-1.0.3 spec/terraspace/hooks/builder_spec.rb
terraspace-1.0.2 spec/terraspace/hooks/builder_spec.rb
terraspace-1.0.1 spec/terraspace/hooks/builder_spec.rb
terraspace-1.0.0 spec/terraspace/hooks/builder_spec.rb
terraspace-0.7.2 spec/terraspace/hooks/builder_spec.rb
terraspace-0.7.1 spec/terraspace/hooks/builder_spec.rb
terraspace-0.7.0 spec/terraspace/hooks/builder_spec.rb
terraspace-0.6.23 spec/terraspace/hooks/builder_spec.rb
terraspace-0.6.22 spec/terraspace/hooks/builder_spec.rb
terraspace-0.6.21 spec/terraspace/hooks/builder_spec.rb
terraspace-0.6.20 spec/terraspace/hooks/builder_spec.rb
terraspace-0.6.19 spec/terraspace/hooks/builder_spec.rb
terraspace-0.6.18 spec/terraspace/hooks/builder_spec.rb
terraspace-0.6.17 spec/terraspace/hooks/builder_spec.rb
terraspace-0.6.16 spec/terraspace/hooks/builder_spec.rb
terraspace-0.6.15 spec/terraspace/hooks/builder_spec.rb
terraspace-0.6.13 spec/terraspace/hooks/builder_spec.rb
terraspace-0.6.12 spec/terraspace/hooks/builder_spec.rb
terraspace-0.6.11 spec/terraspace/hooks/builder_spec.rb