Sha256: 829773848740d5b2af6beda749b144ff4bb3c7d5194b331f5a50032c9753b7af
Contents?: true
Size: 687 Bytes
Versions: 8
Compression:
Stored size: 687 Bytes
Contents
require 'spec_helper' module Berkshelf describe Uploader do subject { Uploader.new(server_url: Chef::Config[:chef_server_url], client_key: Chef::Config[:client_key], client_name: Chef::Config[:node_name]) } describe "#upload" do let(:cookbook) { double('nginx', name: "nginx-0.101.2", cookbook_name: "nginx", version: "0.101.2") } context "when cookbook is invalid" do before(:each) { cookbook.should_receive(:validate!).and_raise(CookbookSyntaxError) } it "raises a CookbookSyntaxError error" do lambda { subject.upload(cookbook) }.should raise_error(CookbookSyntaxError) end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems