Sha256: 460eaf19f1bbe1ebefc89af33882d2342354115337c3898a4cc3e34d6ddc35db

Contents?: true

Size: 727 Bytes

Versions: 71

Compression:

Stored size: 727 Bytes

Contents

require 'spec_helper'

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

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

      it "describes the command" do
        subject
        stdout.rewind
        expect(stdout.readlines.first).to match /List all users/
      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.2.1.rc10 spec/cf/cli/user/help_spec.rb
cf-5.2.1.rc9 spec/cf/cli/user/help_spec.rb
cf-5.2.1.rc8 spec/cf/cli/user/help_spec.rb
cf-5.2.1.rc7 spec/cf/cli/user/help_spec.rb
cf-5.2.1.rc6 spec/cf/cli/user/help_spec.rb
cf-5.2.1.rc5 spec/cf/cli/user/help_spec.rb
cf-5.2.1.rc4 spec/cf/cli/user/help_spec.rb
cf-5.2.1.rc3 spec/cf/cli/user/help_spec.rb
cf-5.2.1.rc2 spec/cf/cli/user/help_spec.rb
cf-5.2.0 spec/cf/cli/user/help_spec.rb
cf-5.1.0.rc1 spec/cf/cli/user/help_spec.rb
cf-5.0.0.rc4 spec/cf/cli/user/help_spec.rb
cf-5.0.0.rc3 spec/cf/cli/user/help_spec.rb
cf-5.0.0.rc1 spec/cf/cli/user/help_spec.rb
cf-4.2.9.rc5 spec/cf/cli/user/help_spec.rb
cf-4.2.9.rc3 spec/cf/cli/user/help_spec.rb
cf-4.2.10.rc2 spec/cf/cli/user/help_spec.rb
cf-4.2.10.rc1 spec/cf/cli/user/help_spec.rb
cf-4.2.9.rc2 spec/cf/cli/user/help_spec.rb
cf-4.2.8 spec/cf/cli/user/help_spec.rb