about summary refs log tree commit homepage
path: root/test/test_plugins.rb
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-03-06 05:31:39 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-03-06 05:31:39 +0000
commitbbaf6bb51edf0402faad07191cc042d5297ed2fc (patch)
tree205f3077cd32a81443a7627bba778e70ac7de32c /test/test_plugins.rb
parenta4a2f19a0c94e72641d3b43c66d7817d2b9c30a9 (diff)
downloadunicorn-bbaf6bb51edf0402faad07191cc042d5297ed2fc.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@83 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'test/test_plugins.rb')
-rw-r--r--test/test_plugins.rb63
1 files changed, 0 insertions, 63 deletions
diff --git a/test/test_plugins.rb b/test/test_plugins.rb
deleted file mode 100644
index 82132b1..0000000
--- a/test/test_plugins.rb
+++ /dev/null
@@ -1,63 +0,0 @@
-require 'test/unit'
-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
-
-class PluginTest < Test::Unit::TestCase
-
-  def setup
-    @pmgr = PluginManager.instance
-    @categories = ["/commands"]
-    @names = ["/first", "/second", "/last", "/atestplugin"]
-  end
-
-  def test_load_plugins
-    puts "#{@pmgr.available.inspect}"
-    @pmgr.available.each {|cat,plugins|
-      plugins.each do |p|
-        puts "TEST: #{cat}#{p}"
-        assert @names.include?(p)
-      end
-    }
-
-    @pmgr.load
-    @pmgr.available.each do |cat,plugins|
-      plugins.each do |p|
-        STDERR.puts "#{cat}#{p}"
-        plugin = @pmgr.create("#{cat}#{p}", options={"name" => p})
-      end
-    end
-  end
-
-  def test_similar_uris
-
-    @pmgr.register("/test", "/testme", ATestPlugin)
-    @pmgr.register("/test2", "/testme", ATestPlugin)
-
-    assert_equal @pmgr.create("/test/testme").class, ATestPlugin
-    assert_equal @pmgr.create("/test2/testme").class, ATestPlugin
-
-  end
-end