Sha256: 760225b00749ae8ac1bef3feabd7de722b88eca913eca5b455fcba36aaa6575e

Contents?: true

Size: 1.24 KB

Versions: 20

Compression:

Stored size: 1.24 KB

Contents

require 'test_helper'

module Vedeu

  describe Plugins do

    let(:described) { Vedeu::Plugins }
    let(:instance)  { described.new }

    describe '#initialize' do
      it { instance.must_be_instance_of(described) }
      it { instance.instance_variable_get('@plugins').must_equal([]) }
    end

    describe '#load' do
      subject { instance.load }

      it { subject.must_be_instance_of(Array) }
      it { subject.must_equal([]) }
    end

    describe '#register' do
      let(:_name) {}
      let(:plugin) { false }

      subject { instance.register(_name, plugin) }

      # @todo Add more tests.
      # it { skip }
    end

    describe '#find' do
      subject { instance.find }

      it { subject.must_be_instance_of(Array) }

      context 'when it finds the vedeu_cli gem' do
        it { subject.size.must_equal(1) }
        it { subject.first.name.must_equal('cli') }
      end
    end

    describe '#names' do
      subject { instance.names }

      it { subject.must_be_instance_of(Hash) }

      context 'when no plugins are registered' do
        it { subject.must_equal({}) }
      end

      context 'when plugins are registered' do
        # @todo Add more tests.
        # it { skip }
      end
    end

  end # Plugins

end # Vedeu

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
vedeu-0.6.17 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.16 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.15 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.14 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.13 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.12 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.11 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.10 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.9 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.8 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.7 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.6 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.5 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.4 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.3 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.2 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.1 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.0 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.5.13 test/lib/vedeu/plugins_test.rb
vedeu-0.5.12 test/lib/vedeu/plugins_test.rb