require 'lib/rtml' require 'spec/rake/spectask' Rake.application.instance_variable_get('@tasks').delete('default') spec_prereq = File.exist?(File.join(RAILS_ROOT, 'config', 'database.yml')) ? "db:test:prepare" : :noop task :noop do end #task :default => :spec #task :stats => "spec:statsetup" remove_task :spec desc "Run all specs in spec directory (excluding plugin specs)" Spec::Rake::SpecTask.new(:rspec => spec_prereq) do |t| t.spec_opts = ['--options', "\"./spec/spec.opts\""] #t.ruby_opts = ["-e 'RTML_ROOT = #{RTML_ROOT.inspect}'"] t.spec_files = FileList[File.join(RTML_ROOT, 'spec/**/*_spec.rb')] end