Skip to content
Newer
Older
100644 21 lines (19 sloc) 629 Bytes
3a9ffee @vanpelt Refactor and version bump to facilitate both ActiveRecord and DataMap…
vanpelt authored Jan 10, 2009
1 require 'spec/rake/spectask'
2 desc "Run specs, run a specific spec with TASK=spec/path_to_spec.rb. By default the tests are run with ActiveRecord, set DM=true to run the tests with DataMapper."
3 task :spec => [ "spec:default" ]
4
5 namespace :spec do
6 OPTS_FILENAME = "./spec/spec.opts"
7 if File.exist?(OPTS_FILENAME)
8 SPEC_OPTS = ["--options", OPTS_FILENAME]
9 else
10 SPEC_OPTS = ["--color", "--format", "specdoc"]
11 end
12
13 Spec::Rake::SpecTask.new('default') do |t|
14 t.spec_opts = SPEC_OPTS
15 if(ENV['TASK'])
16 t.spec_files = [ENV['TASK']]
17 else
18 t.spec_files = Dir['spec/*_spec.rb'].sort
19 end
20 end
21 end
Something went wrong with that request. Please try again.