Sha256: 34ef5c5ed78b5c56c693578abaa871253a5d39d54b369faa3e6b9242ff14cb9e

Contents?: true

Size: 1.27 KB

Versions: 59

Compression:

Stored size: 1.27 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 }

      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

59 entries across 59 versions & 1 rubygems

Version Path
vedeu-0.8.0 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.7.4 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.7.3 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.7.2 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.7.1 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.7.0 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.71 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.70 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.69 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.68 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.67 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.66 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.65 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.64 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.63 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.62 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.61 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.60 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.59 test/lib/vedeu/plugins/plugins_test.rb
vedeu-0.6.58 test/lib/vedeu/plugins/plugins_test.rb