Sha256: 2431b1c63c727050a75fb530957680f213c8de84aec05bdeaf81a83a49f6e2c6

Contents?: true

Size: 642 Bytes

Versions: 15

Compression:

Stored size: 642 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

15 entries across 15 versions & 1 rubygems

Version Path
berkshelf-8.0.15 spec/unit/berkshelf/cli_spec.rb
berkshelf-8.0.13 spec/unit/berkshelf/cli_spec.rb
berkshelf-8.0.12 spec/unit/berkshelf/cli_spec.rb
berkshelf-8.0.9 spec/unit/berkshelf/cli_spec.rb
berkshelf-8.0.7 spec/unit/berkshelf/cli_spec.rb
berkshelf-8.0.5 spec/unit/berkshelf/cli_spec.rb
berkshelf-8.0.2 spec/unit/berkshelf/cli_spec.rb
berkshelf-8.0.1 spec/unit/berkshelf/cli_spec.rb
berkshelf-8.0.0 spec/unit/berkshelf/cli_spec.rb
berkshelf-7.2.2 spec/unit/berkshelf/cli_spec.rb
berkshelf-7.2.1 spec/unit/berkshelf/cli_spec.rb
berkshelf-7.2.0 spec/unit/berkshelf/cli_spec.rb
berkshelf-7.1.0 spec/unit/berkshelf/cli_spec.rb
berkshelf-7.0.10 spec/unit/berkshelf/cli_spec.rb
berkshelf-7.0.9 spec/unit/berkshelf/cli_spec.rb