Sha256: 4a3bef5c45c8e5a47bcf694bc94e73110e0d29b4f74b29c7a3c9d30496532d86

Contents?: true

Size: 897 Bytes

Versions: 71

Compression:

Stored size: 897 Bytes

Contents

require 'spec_helper'

module CF
  module Space
    describe "Help"  do
      let(:global) { {} }
      let(:given) { {} }

      subject do
        capture_output { Mothership.new.invoke(:help, :command => "space") }
      end

      it "describes the command" do
        subject
        stdout.rewind
        expect(stdout.readlines.first).to match /Show space information/
      end

      it "prints the options" do
        subject
        stdout.rewind
        expect(stdout.readlines.any? {|line| line =~ /Options:/ }).to be_true

      end

      context "when the user is not logged in" do
        before do
          capture_output { Mothership.new.invoke(:logout) }
        end

        it "does not require login" do
          subject
          stdout.rewind
          expect(stdout.readlines.first).to_not match /Please log in first to proceed/
        end
      end
    end
  end
end

Version data entries

71 entries across 71 versions & 2 rubygems

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