Sha256: 47a208ec1c5db5938df6296105cca3a984154d3a5f45e73429e5b55bf4973c31

Contents?: true

Size: 629 Bytes

Versions: 4

Compression:

Stored size: 629 Bytes

Contents

require File.join(File.dirname(File.expand_path(__FILE__)), "/../spec_helper.rb")

describe AutomateIt::PackageManager::DPKG do
  before :all do
    @a = AutomateIt.new(:verbosity => Logger::WARN)
    @m = @a.package_manager
    @d = @m.drivers[:dpkg]
  end

  it "should handle hash arguments" do
    # Given
    @d.should_receive(:installed?).and_return(false, ["foonix"])
    @a.should_receive(:sh).and_return do |cmd|
      if cmd =~ /dpkg.*install.*\bfoonix-1.2.3.deb\b/
        true
      else
        raise "Unknown cmd: #{cmd}"
      end
    end

    @d.install({:foonix => "foonix-1.2.3.deb"}, :with => :dpkg)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
automateit-0.71220 spec/unit/package_manager_spec.rb
automateit-0.71221 spec/unit/package_manager_spec.rb
automateit-0.71226.1 spec/unit/package_manager_spec.rb
automateit-0.71226 spec/unit/package_manager_spec.rb