Initial import
[doozer.git] / lib / doozer / loader.rb
blob67881926530715a178fb563a85614ad0bbfa0154
1 # Experimental
2 module Doozer 
3   class << self
4     def load_doozers(fixture_path=nil, doozer_path=nil) 
5       fixture_path ||= File.expand_path(File.join(RAILS_ROOT, 'test', 'fixtures'))
6       doozer_path  ||= File.expand_path(File.join(fixture_path, 'doozers'))
7       
8       # Add fixtures to the load path so that doozers can require other doozers
9       $: << fixture_path
10       # Load all the doozers!
11       Dir[ File.join(doozer_path, '*.rb') ].each do |doozer|
12         require doozer
13       end
14     end
15   end
16 end