File: Rakefile

package info (click to toggle)
ruby-org 0.9.12-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,852 kB
  • sloc: ruby: 3,044; lisp: 50; makefile: 4
file content (29 lines) | stat: -rw-r--r-- 840 bytes parent folder | download | duplicates (3)
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
require 'rspec/core'
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec) do |spec|
  spec.pattern = FileList['spec/**/*_spec.rb']
  spec.rspec_opts = ["--format", "documentation", "--colour"]
end

Dir['tasks/*'].each {|task| import task }

task :test do
  exit_status = nil

  puts "Testing without CodeRay nor Pygments for code syntax highlight"
  system('bundle --without pygments:coderay > /dev/null 2>&1')
  exit_status = system('bundle exec rake spec')

  puts "Testing with CodeRay for code syntax highlight"
  system('bundle --without pygments > /dev/null 2>&1')
  exit_status = system('bundle exec rake spec')

  puts "Testing with Pygments for code syntax highlight"
  system('bundle --without coderay > /dev/null 2>&1')
  exit_status = system('bundle exec rake spec')

  exit exit_status
end

task :default => 'test'