Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 58 lines (44 sloc) 1.339 kb
f7a9e18 @akshayrawat engine skeleton
authored
1 # encoding: UTF-8
2 require 'rubygems'
3 begin
4 require 'bundler/setup'
5 rescue LoadError
6 puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
7 end
8
9 require 'rake'
6bb6666 @akshayrawat api specs for active_record backend
authored
10 require 'rdoc/task'
f7a9e18 @akshayrawat engine skeleton
authored
11
12 require 'rake/testtask'
13
ec68d55 @akshayrawat tests for mongoid, refactor active record tests
authored
14 namespace :test do
15
16 desc "Run all tests for the ActiveRecord backend"
17 Rake::TestTask.new(:active_record) do |t|
ce30152 @akshayrawat api specs for mongoid
authored
18 t.pattern = 'test/**/*_test.rb'
19 t.libs = [ "test/dummy_active_record" ]
ec68d55 @akshayrawat tests for mongoid, refactor active record tests
authored
20 end
f7a9e18 @akshayrawat engine skeleton
authored
21
c355433 @akshayrawat 1.8.7 support
authored
22 if RUBY_VERSION =~ /^1\.9/
23
24 desc "Run all tests for the Mongoid backend"
25 Rake::TestTask.new(:mongoid) do |t|
26 t.pattern = 'test/**/*_test.rb'
27 t.libs = [ "test/dummy_mongoid" ]
28 end
29 desc "Runs all tests"
30 task "all"=> [ :active_record, :mongoid ]
31
32 else
33 # delayed_job_mongoid needs ~> mongoid 3.0 which needs ruby 1.9.
34 desc "Runs active_record tests"
35 task "all"=> [ :active_record ]
ce30152 @akshayrawat api specs for mongoid
authored
36
c355433 @akshayrawat 1.8.7 support
authored
37 end
ce30152 @akshayrawat api specs for mongoid
authored
38
eb36e5e @akshayrawat travis config
authored
39 desc "Prepare environment for tests"
40 task :prepare do
a9eb67a @timoschilling execute rake rate:prepare subtask at once
timoschilling authored
41 Dir.chdir File.expand_path("../test/dummy_active_record", __FILE__) do
42 system("rake db:create:all db:migrate db:test:clone")
43 end
eb36e5e @akshayrawat travis config
authored
44 end
45
ec68d55 @akshayrawat tests for mongoid, refactor active record tests
authored
46 end
f7a9e18 @akshayrawat engine skeleton
authored
47
612125d @akshayrawat 1.8.7 compat rakefile
authored
48 task :default=> 'test:all'
ce30152 @akshayrawat api specs for mongoid
authored
49
f7a9e18 @akshayrawat engine skeleton
authored
50 Rake::RDocTask.new(:rdoc) do |rdoc|
51 rdoc.rdoc_dir = 'rdoc'
52 rdoc.title = 'DjMon'
53 rdoc.options << '--line-numbers' << '--inline-source'
54 rdoc.rdoc_files.include('README.rdoc')
55 rdoc.rdoc_files.include('lib/**/*.rb')
56 end
6bb6666 @akshayrawat api specs for active_record backend
authored
57
Something went wrong with that request. Please try again.