#!/usr/bin/env ruby
require File.expand_path(File.dirname(__FILE__) + "/../lib/spec") # better stack traces this way

$context_runner = ::Spec::Runner::OptionParser.create_context_runner(ARGV, false, STDERR, STDOUT)

ARGV.each do |file_or_dir|
	if File.lstat(file_or_dir).directory? then
		(Dir.open(file_or_dir).select {|f| f =~ /.*\.rb/}).each {|file| require "#{file_or_dir}/#{file}"}
	else
		require file_or_dir
	end
end

$context_runner.run(true)

