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.10.6 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.10.5 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.10.4 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.10.3 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.10.2 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.10.1 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.10.0 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.9.8 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.9.7 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.9.6 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.9.5 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.9.4 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.9.2 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.9.1 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.9.0 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.8.11 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.8.10 spec/gem_plugins/plugin_manager_spec.rb
fedux_org-stdlib-0.8.9 spec/gem_plugins/plugin_manager_spec.rb