Sha256: 2b4845ee18a715ac55477078218d58b07348bf5f8c147cda06caf2ee60d7ad88

Contents?: true

Size: 638 Bytes

Versions: 11

Compression:

Stored size: 638 Bytes

Contents

require 'spec_helper'

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

    before do
      Berksfile.stub(: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

11 entries across 11 versions & 1 rubygems

Version Path
berkshelf-3.1.5 spec/unit/berkshelf/cli_spec.rb
berkshelf-3.1.4 spec/unit/berkshelf/cli_spec.rb
berkshelf-3.1.3 spec/unit/berkshelf/cli_spec.rb
berkshelf-3.1.2 spec/unit/berkshelf/cli_spec.rb
berkshelf-3.1.1 spec/unit/berkshelf/cli_spec.rb
berkshelf-3.1.0 spec/unit/berkshelf/cli_spec.rb
berkshelf-3.0.1 spec/unit/berkshelf/cli_spec.rb
berkshelf-3.0.0 spec/unit/berkshelf/cli_spec.rb
berkshelf-3.0.0.rc1 spec/unit/berkshelf/cli_spec.rb
berkshelf-3.0.0.beta9 spec/unit/berkshelf/cli_spec.rb
berkshelf-3.0.0.beta8 spec/unit/berkshelf/cli_spec.rb