Sha256: bce2337d693ee22bb4310c28189e51ce7a32336551f65ba97f297aae9379e440

Contents?: true

Size: 626 Bytes

Versions: 5

Compression:

Stored size: 626 Bytes

Contents

require 'spec_helper'
require 'profitbricks_datacenter_list'

Chef::Knife::ProfitbricksDatacenterList.load_deps

describe Chef::Knife::ProfitbricksDatacenterList do
  before :each do
    subject { Chef::Knife::ProfitbricksDatacenterList.new }
    allow(subject).to receive(:puts)
  end

  describe '#run' do
    it 'should output the column headers' do
      expect(subject).to receive(:puts).with(/^ID\s+Name\s+Description\s+Location\s+Version\s*$/)
      subject.run
    end

    it 'should output the data center locations' do
      expect(subject).to receive(:puts).with(/(?:us\/las)/)
      subject.run
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
knife-profitbricks-1.2.1 spec/chef/knife/profitbricks_datacenter_list_spec.rb
knife-profitbricks-1.2.0 spec/chef/knife/profitbricks_datacenter_list_spec.rb
knife-profitbricks-1.1.2 spec/chef/knife/profitbricks_datacenter_list_spec.rb
knife-profitbricks-1.1.1 spec/chef/knife/profitbricks_datacenter_list_spec.rb
knife-profitbricks-1.0.0 spec/chef/knife/profitbricks_datacenter_list_spec.rb