Sha256: f3209b3e5c6878e84348be9c3a33df72d9ee89ee75390afae0eeaa2d0391fec0

Contents?: true

Size: 1.31 KB

Versions: 38

Compression:

Stored size: 1.31 KB

Contents

# encoding: utf-8
require 'spec_helper'
require 'fedux_org_stdlib/gem_plugins/plugin_manager'

RSpec.describe GemPlugins::PluginManager do
  module FeduxOrgStdlib
    module Fixtures
      module PluginManager
        module Load
          class PluginManager < GemPlugins::PluginManager
          end
        end
      end
    end
  end

  context '#activate_plugin' do
    it 'loads available plugins only on request' do
      manager = FeduxOrgStdlib::Fixtures::PluginManager::Load::PluginManager.new
      expect('FeduxOrgStdlib::Fixtures::PluginManager::Plugin::Load').not_to be_defined

      manager.activate_plugin 'fedux_org_stdlib-fixtures-plugin_manager-load'
      expect('FeduxOrgStdlib::Fixtures::PluginManager::Plugin::Load').to be_defined
    end
  end

  it 'outputs warning if plugin cannout be found' do
    manager = FeduxOrgStdlib::Fixtures::PluginManager::Load::PluginManager.new

    result = capture :stderr do
      manager.activate_plugin 'plugin-blub'
    end

    expect(result).to include 'plugin-blub'
  end

  # context '#to_s' do
  #  it 'has a string representation' do
  #    manager = FeduxOrgStdlib::Fixtures::PluginManager::Load::PluginManager.new
  #    manager.activate_plugin 'fedux_org_stdlib-fixtures-plugin_manager-load'

  #    expect(manager.to_s).to include '1 row in set'
  #  end
  # end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.11.18 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.17 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.16 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.15 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.14 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.12 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.11 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.9 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.8 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.7 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.6 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.5 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.4 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.3 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.2 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.1 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.11.0 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.10.9 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.10.8 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.10.7 spec/gem_plugins/plugin_manager_spec.rb