All plugins load by themselves now.
[kaya.git] / test / plugins / test_loadable.rb
blobaae1ab828e891c3ac5eae6a80fc42194c2a3763f
1 # Copyright (c) 2009 Paolo Capriotti <p.capriotti@gmail.com>
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 require 'test/unit'
9 require 'plugins/loader'
10 require 'rbconfig'
12 class TestLoadable < Test::Unit::TestCase
13   RUBY_EXE = Config::CONFIG['ruby_install_name']
15   def test_load_plugins
16     plugins = PluginLoader.base_dir
17     lib = File.join(plugins, '..')
18     
19     Dir[File.join(plugins, '*')].each do |f|
20       if File.directory?(f)
21         Dir[File.join(f, '*.rb')].each do |rb_file|
22           `#{RUBY_EXE} -I#{lib} #{rb_file}`
23           assert_equal 0, $?
24         end
25       end
26     end
27   end
28   
29 end
30       
31