class Autotest
def self.autodiscover
end
"rails" if File.exist? 'config/environment.rb'
Autotest.add_discovery do
=== Example autotest/discover.rb:
4. Invoke run method on appropriate class (eg Autotest::RailsRspec.run).
3. Require file by sorting styles and joining (eg 'autotest/rails_rspec').
2. Those procs determine your styles (eg ["rails", "rspec"]).
1. All autotest/discover.rb files loaded.
=== Process:
a corresponding name.
environment. That plugin should define a subclass of Autotest with
combined to dynamically invoke an autotest plugin to suite your
describing the user's current environment. Those styles are then
+add_discovery+. That proc should return one or more strings
should register discovery procs with autotest using
"autotest/discover.rb". If found, that file is loaded and it
searching your loadpath, vendor/plugins, and rubygems for
Automatically find all potential autotest runner styles by
#
def self.autodiscover require 'rubygems' Gem.find_files("autotest/discover").each do |f| load f end #call all discover procs an determine style @@discoveries.map{ |proc| proc.call }.flatten.compact.sort.uniq end