Sha256: 33fd67b5baf4536f3a2536123f9d1c8ee28b48b64963172d97042182ea972027

Contents?: true

Size: 1.3 KB

Versions: 31

Compression:

Stored size: 1.3 KB

Contents

# frozen_string_literal: true

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 }

      before { Vedeu.stubs(:log) }

      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

31 entries across 31 versions & 1 rubygems

Version Path
vedeu-0.8.32 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.31 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.30 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.29 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.28 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.27 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.26 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.25 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.24 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.23 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.22 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.21 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.20 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.19 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.18 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.17 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.16 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.15 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.14 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.8.13 test/lib/vedeu/plugins/plugins_test.rb