diff --git a/test/plugins/commands/test1.rb b/test/plugins/commands/test1.rb deleted file mode 100644 index b8c0d890..00000000 --- a/test/plugins/commands/test1.rb +++ /dev/null @@ -1,19 +0,0 @@ - -class First < Mongrel::Plugin "/commands" - def initialize(options = {}) - puts "First with options: #{options.inspect}" - end -end - -class Second < Mongrel::Plugin "/commands" - def initialize(options = {}) - puts "Second with options: #{options.inspect}" - end -end - -class Last < Mongrel::Plugin "/commands" - def initialize(options = {}) - puts "Last with options: #{options.inspect}" - end -end - diff --git a/test/test_plugins.rb b/test/test_plugins.rb index 2f3ec3f2..86587931 100644 --- a/test/test_plugins.rb +++ b/test/test_plugins.rb @@ -4,6 +4,24 @@ require 'mongrel' class ATestPlugin < Mongrel::Plugin "/stuff" end +class First < Mongrel::Plugin "/commands" + def initialize(options = {}) + puts "First with options: #{options.inspect}" + end +end + +class Second < Mongrel::Plugin "/commands" + def initialize(options = {}) + puts "Second with options: #{options.inspect}" + end +end + +class Last < Mongrel::Plugin "/commands" + def initialize(options = {}) + puts "Last with options: #{options.inspect}" + end +end + include Mongrel @@ -12,11 +30,12 @@ class PluginTest < Test::Unit::TestCase def setup @pmgr = PluginManager.instance @categories = ["/commands"] - @names = ["/first","/second","/last", "/atestplugin"] + @names = ["/first", "/second", "/last", "/atestplugin"] end def test_load_plugins - @pmgr.load(File.join(File.dirname(__FILE__),"plugins")) + @pmgr.load + puts "#{@pmgr.available.inspect}" @pmgr.available.each {|cat,plugins| plugins.each do |p|