Sha256: c3563caa5a6641dc36c7c58d5750a95517867be8c409d633c764022fc014e746

Contents?: true

Size: 651 Bytes

Versions: 27

Compression:

Stored size: 651 Bytes

Contents

require "spec_helper"

module Berkshelf
  describe Cli do
    let(:subject) { described_class.new }
    let(:berksfile) { double("Berksfile") }
    let(:cookbooks) { ["mysql"] }

    before do
      allow(Berksfile).to receive(:from_options).and_return(berksfile)
    end

    describe "#upload" do
      it "calls to upload with params if passed in cli" do
        expect(berksfile).to receive(:upload).with(cookbooks,
          include(skip_syntax_check: true, freeze: false)
        )

        subject.options[:skip_syntax_check] = true
        subject.options[:no_freeze]         = true
        subject.upload("mysql")
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
berkshelf-7.0.8 spec/unit/berkshelf/cli_spec.rb
berkshelf-7.0.7 spec/unit/berkshelf/cli_spec.rb
berkshelf-6.3.4 spec/unit/berkshelf/cli_spec.rb
berkshelf-7.0.6 spec/unit/berkshelf/cli_spec.rb
berkshelf-7.0.5 spec/unit/berkshelf/cli_spec.rb
berkshelf-6.3.3 spec/unit/berkshelf/cli_spec.rb
berkshelf-7.0.4 spec/unit/berkshelf/cli_spec.rb
berkshelf-7.0.3 spec/unit/berkshelf/cli_spec.rb
berkshelf-7.0.2 spec/unit/berkshelf/cli_spec.rb
berkshelf-7.0.1 spec/unit/berkshelf/cli_spec.rb
berkshelf-7.0.0 spec/unit/berkshelf/cli_spec.rb
berkshelf-6.3.2 spec/unit/berkshelf/cli_spec.rb
berkshelf-6.3.1 spec/unit/berkshelf/cli_spec.rb
berkshelf-6.3.0 spec/unit/berkshelf/cli_spec.rb
berkshelf-6.2.2 spec/unit/berkshelf/cli_spec.rb
berkshelf-6.2.1 spec/unit/berkshelf/cli_spec.rb
berkshelf-6.2.0 spec/unit/berkshelf/cli_spec.rb
berkshelf-6.1.1 spec/unit/berkshelf/cli_spec.rb
berkshelf-6.1.0 spec/unit/berkshelf/cli_spec.rb
berkshelf-6.0.1 spec/unit/berkshelf/cli_spec.rb