diff options
author | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-02-28 07:04:41 +0000 |
---|---|---|
committer | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-02-28 07:04:41 +0000 |
commit | d1a01c03f71c14e5d4fe66d93c5ab444c0aba554 (patch) | |
tree | d7d4df48f1e708dfceea7bd78907177e5b1be889 /test | |
parent | 4e5132f63a210beb766ebfe52bea7424903403ae (diff) | |
download | unicorn-d1a01c03f71c14e5d4fe66d93c5ab444c0aba554.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@65 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'test')
-rw-r--r-- | test/plugins/commands/test1.rb | 8 | ||||
-rw-r--r-- | test/test_plugins.rb | 11 |
2 files changed, 10 insertions, 9 deletions
diff --git a/test/plugins/commands/test1.rb b/test/plugins/commands/test1.rb index b999d38..b8c0d89 100644 --- a/test/plugins/commands/test1.rb +++ b/test/plugins/commands/test1.rb @@ -1,19 +1,17 @@ -include Mongrel - -class First < Plugin "/commands" +class First < Mongrel::Plugin "/commands" def initialize(options = {}) puts "First with options: #{options.inspect}" end end -class Second < Plugin "/commands" +class Second < Mongrel::Plugin "/commands" def initialize(options = {}) puts "Second with options: #{options.inspect}" end end -class Last < Plugin "/commands" +class Last < Mongrel::Plugin "/commands" def initialize(options = {}) puts "Last with options: #{options.inspect}" end diff --git a/test/test_plugins.rb b/test/test_plugins.rb index 680dac5..0700e50 100644 --- a/test/test_plugins.rb +++ b/test/test_plugins.rb @@ -9,7 +9,7 @@ class PluginTest < Test::Unit::TestCase def setup @pmgr = PluginManager.instance @categories = ["/commands"] - @names = ["FirstCommand", "SecondCommand", "LastCommands"] + @names = ["/first","/second","/last"] end def test_load_plugins @@ -17,13 +17,16 @@ class PluginTest < Test::Unit::TestCase puts "#{@pmgr.available.inspect}" @pmgr.available.each {|cat,plugins| plugins.each do |p| - puts "TEST: #{cat}/#{p}" + puts "TEST: #{cat}#{p}" assert @names.include?(p) end } - @pmgr.available.each do |name| - plugin = @pmgr.create(name, options={"name" => name}) + @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 |