Sha256: 51313376a7010c91a91b51344653d35007299bf3010d2c2374d60b464b6a4b66

Contents?: true

Size: 1.6 KB

Versions: 53

Compression:

Stored size: 1.6 KB

Contents

require 'spec_helper'

describe CFMicro::McfCommand do
  shared_examples 'micro common inputs' do
    describe 'inputs' do
      subject { command.inputs }
      it { expect(subject[:vmx][:description]).to eq "Path to micro.vmx" }
      it { expect(subject[:password][:description]).to eq "Cleartext password for guest VM vcap user" }
    end

    describe 'arguments' do
      subject { command.arguments }

      it 'has the correct argument order' do
        should eq([
                      {:type => :required, :value => nil, :name => :vmx},
                      {:type => :optional, :value => nil, :name => :password}
                  ])
      end
    end
  end

  describe 'micro_status' do
    describe '#metadata' do
      let(:command) { Mothership.commands[:micro_status] }

      include_examples 'micro common inputs'

      describe 'command' do
        subject { command }

        its(:description) { should eq "Display Micro Cloud Foundry VM status" }
      end
    end
  end

  describe '#micro_offline' do
    describe 'metadata' do
      let(:command) { Mothership.commands[:micro_offline] }

      include_examples 'micro common inputs'

      describe 'command' do
        subject { command }

        its(:description) { should eq "Micro Cloud Foundry offline mode" }
      end
    end
  end

  describe '#micro_online' do
    describe 'metadata' do
      let(:command) { Mothership.commands[:micro_online] }

      include_examples 'micro common inputs'

      describe 'command' do
        subject { command }

        its(:description) { should eq "Micro Cloud Foundry online mode" }
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 2 rubygems

Version Path
cf-5.4.7 spec/micro/plugin_spec.rb
cf-5.4.7.rc1 spec/micro/plugin_spec.rb
cf-5.4.5 spec/micro/plugin_spec.rb
cf-5.4.4 spec/micro/plugin_spec.rb
trucker-cli-0.0.3 spec/micro/plugin_spec.rb
cf-5.4.3 spec/micro/plugin_spec.rb
cf-5.4.2 spec/micro/plugin_spec.rb
trucker-cli-0.0.2 spec/micro/plugin_spec.rb
trucker-cli-0.0.1 spec/micro/plugin_spec.rb
cf-5.4.1 spec/micro/plugin_spec.rb
cf-5.4.1.rc1 spec/micro/plugin_spec.rb
cf-5.4.0 spec/micro/plugin_spec.rb
cf-5.3.1 spec/micro/plugin_spec.rb
cf-5.3.0 spec/micro/plugin_spec.rb
cf-5.2.2 spec/micro/plugin_spec.rb
cf-5.2.1.rc15 spec/micro/plugin_spec.rb
cf-5.2.1.rc14 spec/micro/plugin_spec.rb
cf-5.2.1.rc13 spec/micro/plugin_spec.rb
cf-5.2.1.rc12 spec/micro/plugin_spec.rb
cf-5.2.1.rc11 spec/micro/plugin_spec.rb