forked from publiclab/plots2
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
42 lines (34 loc) · 1.14 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
Plots2::Application.load_tasks
Rake::Task['test:run'].clear
Rake::Task['test:all'].clear
namespace :test do
# run normal rails tests but not solr tests
#Rake::TestTask.new(:_run) do |t|
Rake::TestTask.new(:run) do |t|
t.libs << "test"
t.test_files = FileList['test/**/*_test.rb']
end
desc "Run rails and jasmine tests"
task :all => :environment do
require 'coveralls/rake/task'
Coveralls::RakeTask.new
if ENV['GENERATE_REPORT'] == 'true'
require 'ci/reporter/rake/test_unit'
Rake::Task["ci:setup:testunit"].execute
end
puts "Running Rails tests"
Rake::Task["test:run"].execute
puts "Running jasmine tests headlessly"
Rake::Task["spec:javascript"].execute
Rake::Task["coveralls:push"].execute
end
desc "Run rails and jasmine tests"
task :javascript do
puts "Running jasmine tests headlessly"
Rake::Task["spec:javascript"].execute
end
end