Sha256: bf72564b2204f173881f8954148669071ef30aac7882bb22904b0da6546458d8

Contents?: true

Size: 1.45 KB

Versions: 1

Compression:

Stored size: 1.45 KB

Contents

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

# The CocoaPods namespace
#
module CLAide
  describe Command::Plugins do
    before do
      argv = CLAide::ARGV.new([])
      @command = Command::Plugins.new(argv)
    end

    it 'registers itself and uses the default subcommand' do
      Command.parse(%w(plugins)).should.be.instance_of Command::Plugins::List
    end

    it 'exists' do
      @command.should.not.be.nil?
    end
  end

  describe Plugins do
    it 'should have a default config' do
      config = CLAide::Plugins.config
      config.should.be.instance_of CLAide::Plugins::Configuration
    end

    it 'should default to a CLAide plugin config' do
      config = CLAide::Plugins.config
      config.name.should.equal('default name')
      config.plugin_prefix.should.equal('claide')
      config.plugin_list_url.should.equal('https://github.com/cocoapods/claide-plugins/something.json')
      url = config.plugin_template_url
      url.should.equal('https://github.com/cocoapods/claide-plugins-template')
    end

    it 'should set the plugin_prefix in the claide plugin manager' do
      CLAide::Plugins.config =
        CLAide::Plugins::Configuration.new('testing',
                                           'pants',
                                           'http://example.com/pants.json',
                                           'http://example.com/pants_template')
      CLAide::Plugins.config.plugin_prefix.should.equal('pants')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
claide-plugins-0.9.0 spec/command/plugins_spec.rb