Sha256: 0a2703fef76f3a58a0615f0bec526a3eed7844424127bf3170b5bf43c6d65a87

Contents?: true

Size: 1015 Bytes

Versions: 16

Compression:

Stored size: 1015 Bytes

Contents

require 'spec_helper'

describe Cany::Dpkg::Builder do
  let!(:dir) { Dir.mktmpdir }
  after { FileUtils.remove_entry dir}
  let(:spec) do
    s = Cany::Specification.new do
      name 'dpkg-creator-test'
      version '0.1'
      description 'Test Project'
      maintainer_name 'Hans Otto'
      maintainer_email 'hans.otto@example.org'
      website 'http://example.org'
      licence 'GPL-2+'
    end
    s.base_dir = dir
    s
  end
  let(:builder) { Cany::Dpkg::Builder.new(spec) }

  describe '#run' do
    subject { builder.run 'clean' }
    it 'should set system_recipe' do
      expect(spec).to receive(:system_recipe=).with(kind_of(Cany::Dpkg::DebHelperRecipe)).and_call_original
      subject
    end

    it 'should setup recipes' do
      expect(spec).to receive(:setup_recipes).and_call_original
      subject
    end

    it 'should call delegate the clean action to the loaded recipes' do
      expect_any_instance_of(Cany::Dpkg::DebHelperRecipe).to receive(:clean)
      subject
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
cany-0.5.7 spec/cany/dpkg/builder_spec.rb
cany-0.5.6 spec/cany/dpkg/builder_spec.rb
cany-0.5.5 spec/cany/dpkg/builder_spec.rb
cany-0.5.4 spec/cany/dpkg/builder_spec.rb
cany-0.5.3 spec/cany/dpkg/builder_spec.rb
cany-0.5.2 spec/cany/dpkg/builder_spec.rb
cany-0.5.1 spec/cany/dpkg/builder_spec.rb
cany-0.5.0 spec/cany/dpkg/builder_spec.rb
cany-0.4.0 spec/cany/dpkg/builder_spec.rb
cany-0.3.0 spec/cany/dpkg/builder_spec.rb
cany-0.2.1 spec/cany/dpkg/builder_spec.rb
cany-0.2.0 spec/cany/dpkg/builder_spec.rb
cany-0.1.3 spec/cany/dpkg/builder_spec.rb
cany-0.1.2 spec/cany/dpkg/builder_spec.rb
cany-0.1.1 spec/cany/dpkg/builder_spec.rb
cany-0.1.0 spec/cany/dpkg/builder_spec.rb