Sha256: d0881e9ac605b14685dbed1bd9f1964ce4f39dca468f430962bc3e54533cec5f
Contents?: true
Size: 1.44 KB
Versions: 22
Compression:
Stored size: 1.44 KB
Contents
require 'spec_helper' describe Berkshelf::Downloader do let(:berksfile) { double('berksfile') } subject { described_class.new(berksfile) } describe "#download" do skip end describe "#try_download" do let(:remote_cookbook) { double('remote-cookbook') } let(:source) do source = double('source') allow(source).to receive(:cookbook) { remote_cookbook } source end let(:name) { "fake" } let(:version) { "1.0.0" } it "supports the 'opscode' location type" do allow(remote_cookbook).to receive(:location_type) { :opscode } allow(remote_cookbook).to receive(:location_path) { "http://api.opscode.com" } rest = double('community-rest') expect(Berkshelf::CommunityREST).to receive(:new).with("http://api.opscode.com") { rest } expect(rest).to receive(:download).with(name, version) subject.try_download(source, name, version) end it "supports the 'supermarket' location type" do allow(remote_cookbook).to receive(:location_type) { :supermarket } allow(remote_cookbook).to receive(:location_path) { "http://api.supermarket.com" } rest = double('community-rest') expect(Berkshelf::CommunityREST).to receive(:new).with("http://api.supermarket.com") { rest } expect(rest).to receive(:download).with(name, version) subject.try_download(source, name, version) end it "supports the 'file_store' location type" do skip end end end
Version data entries
22 entries across 22 versions & 1 rubygems