/vendor/plugins/topfunky_power_tools/init.rb

https://github.com/bricooke/my-biz-expenses · Ruby · 17 lines · 10 code · 2 blank · 5 comment · 3 complexity · f7c6e7676caabf58fbdefe11f76508ac MD5 · raw file

  1. Test::Unit::TestCase.send :include, Topfunky::TestHelper
  2. # Shamelessly looted from http://svn.techno-weenie.net/projects/plugins/gems/init.rb
  3. #
  4. # Adds vendor directories to the load path.
  5. #
  6. # You still need to +require+ the libraries you are using.
  7. standard_dirs = ['rails', 'plugins']
  8. gems = Dir[File.join(RAILS_ROOT, "vendor/**") ]
  9. if gems.any?
  10. gems.each do |dir|
  11. next if standard_dirs.include?(File.basename(dir))
  12. lib = File.join(dir, 'lib')
  13. $LOAD_PATH.unshift(lib) if File.directory?(lib)
  14. end
  15. end