@registered_plugins = {}
end
+ # Removes a plugin from the registered plugins
+ # It doesn't unload the plugin
+ def self.unregister(id)
+ @registered_plugins.delete(id)
+ end
+
# Checks if a plugin is installed
#
# @param [String] id name of the plugin
assert_tag 'form', :attributes => {:action => '/settings/plugin/foo'},
:descendant => {:tag => 'input', :attributes => {:name => 'settings[sample_setting]', :value => 'Plugin setting value'}}
- Redmine::Plugin.clear
+ ensure
+ Redmine::Plugin.unregister(:foo)
end
def test_get_invalid_plugin_settings
get :plugin, :id => 'foo'
assert_response 404
- Redmine::Plugin.clear
+ ensure
+ Redmine::Plugin.unregister(:foo)
end
def test_post_plugin_settings
post :plugin, :id => 'foo', :settings => {'sample_setting' => 'Value'}
assert_response 404
- Redmine::Plugin.clear
+ ensure
+ Redmine::Plugin.unregister(:foo)
end
end