spec/unit/berkshelf/uploader_spec.rb in berkshelf-7.0.8 vs spec/unit/berkshelf/uploader_spec.rb in berkshelf-7.0.9

- old
+ new

@@ -3,18 +3,16 @@ module Berkshelf describe Uploader do let(:berksfile) do double(Berksfile, lockfile: lockfile, - dependencies: [] - ) + dependencies: []) end let(:lockfile) do double(Lockfile, - graph: graph - ) + graph: graph) end let(:graph) { double(Lockfile::Graph, locks: {}) } let(:self_signed_crt_path) { File.join(BERKS_SPEC_DATA, "trusted_certs") } let(:self_signed_crt) { OpenSSL::X509::Certificate.new(IO.read("#{self_signed_crt_path}/example.crt")) } @@ -46,11 +44,11 @@ expect(instance.names).to eq(%w{cookbook_1 cookbook_2}) end end describe "#run" do - let(:options) { Hash.new } + let(:options) { {} } let(:chef_config) do double(Berkshelf::ChefConfigCompat, node_name: "fake-client", client_key: "client-key", @@ -59,19 +57,17 @@ validation_key: "validator.pem", artifactory_api_key: "secret", cookbook_copyright: "user", cookbook_email: "user@example.com", cookbook_license: "apachev2", - trusted_certs_dir: self_signed_crt_path - ) + trusted_certs_dir: self_signed_crt_path) end let(:berkshelf_config) do double(Config, ssl: double(verify: true), - chef: chef_config - ) + chef: chef_config) end let(:default_ridley_options) do { client_name: "fake-client", @@ -209,10 +205,10 @@ context "when given a cookbook that has dependencies which have dependencies" do subject { described_class.new(berksfile).send(:lookup_dependencies, "runit") } it "returns array of cookbook's dependencies and their dependencies" do - expect(subject).to eq ["build-essential", "yum", "yum-epel"] + expect(subject).to eq %w{build-essential yum yum-epel} end end end describe "#filtered_cookbooks" do