Sha256: 861fed73259ec1ea52db32d11080d28f633304c49876c3e0a185563f325ffdc0

Contents?: true

Size: 1021 Bytes

Versions: 8

Compression:

Stored size: 1021 Bytes

Contents

require File.expand_path('../../../spec_helper', __FILE__)
require 'tmpdir'

module Pod
  describe Command::Trunk::Info do
    describe 'CLAide' do
      it 'registers it self' do
        Command.parse(%w( trunk info )).should.be.instance_of Command::Trunk::Info
      end
    end

    it 'should error without a pod name' do
      command = Command.parse(%w( trunk info ))
      lambda { command.validate! }.should.raise CLAide::Help
    end

    it 'should show information for a pod' do
      url = 'https://trunk.cocoapods.org/api/v1/pods/Stencil'
      stub_request(:get, url).to_return(:body => {
        'owners' => [
          {
            'name' => 'Kyle Fuller',
            'email' => 'kyle@example.com',
          },
        ],
      }.to_json)

      command = Command.parse(%w( trunk info Stencil ))
      lambda { command.validate! }.should.not.raise CLAide::Help
      command.run

      UI.output.should.include 'Owners'
      UI.output.should.include 'Kyle Fuller <kyle@example.com>'
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
cocoapods-trunk-1.6.0 spec/command/trunk/info_spec.rb
cocoapods-trunk-1.5.0 spec/command/trunk/info_spec.rb
cocoapods-trunk-1.4.1 spec/command/trunk/info_spec.rb
cocoapods-trunk-1.4.0 spec/command/trunk/info_spec.rb
cocoapods-dependency-html-0.0.2 vendor/bundle/gems/cocoapods-trunk-1.3.1/spec/command/trunk/info_spec.rb
cocoapods-dependency-html-0.0.1 vendor/bundle/gems/cocoapods-trunk-1.3.1/spec/command/trunk/info_spec.rb
cocoapods-trunk-1.3.1 spec/command/trunk/info_spec.rb
cocoapods-trunk-1.3.0 spec/command/trunk/info_spec.rb