Sha256: 347ccaa5e0c7de4c0ff72382a07298cd5cea1c33a83a9b7ded6dcfb1e8d78a10
Contents?: true
Size: 1.37 KB
Versions: 10
Compression:
Stored size: 1.37 KB
Contents
# encoding: utf-8 require 'spec_helper' require 'fedux_org_stdlib/gem_plugins/plugin_manager' RSpec.describe GemPlugins::PluginManager do context '#load_plugins' do it 'loads available plugins' do manager = GemPlugins::PluginManager.new prefix: 'fedux_org_stdlib-fixtures-plugin_manager-' manager.disable_plugin 'plugin-no_load' manager.load_plugins expect('FeduxOrgStdlib::Fixtures::PluginManager::Plugin::Load').to be_defined end end context '#disable' do it 'disable plugin' do manager = GemPlugins::PluginManager.new prefix: 'fedux_org_stdlib-fixtures-plugin_manager-' manager.disable_plugin 'plugin-no_load' manager.load_plugins expect('FeduxOrgStdlib::Fixtures::PluginManager::Plugin::NoLoad').not_to be_defined end it 'outputs warning if plugin cannout be found' do manager = GemPlugins::PluginManager.new prefix: 'fedux_org_stdlib-fixtures-plugin_manager-' result = capture :stderr do manager.disable_plugin 'plugin-blub' end expect(result).to include 'plugin-blub' end end context '#to_s' do it 'has a string representation' do manager = GemPlugins::PluginManager.new prefix: 'fedux_org_stdlib-fixtures-plugin_manager-' manager.disable_plugin 'plugin-no_load' manager.load_plugins expect(manager.to_s).to include 'plugin' end end end
Version data entries
10 entries across 10 versions & 1 rubygems