Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e2e50db0da
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 34 lines (27 sloc) 0.868 kb
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
require 'bundler/gem_tasks'

begin
  require 'rspec/core/rake_task'

  RSpec::Core::RakeTask.new(:spec)

  RSpec::Core::RakeTask.new(:coverage) do |spec|
    spec.pattern = 'spec/**/*_spec.rb'
    spec.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,/Library/Ruby/*,config/*" --text-summary --sort coverage]
    spec.rcov = true
  end

  require "yaml"
  RubyVersions = YAML.load_file(".travis.yml")["rvm"]
  desc "Run Rspec against multiple Rubies: #{RubyVersions.join(", ")}"
  task :spec_all do
    cmd = %[bash -c 'source ~/.rvm/scripts/rvm; rvm #{RubyVersions.join(",")} do rake spec']
    puts cmd
    system cmd
  end


  if RUBY_VERSION <= "1.8.7"
    task :default => [:coverage]
  else
    task :default => [:spec]
  end
rescue LoadError => e
  puts "Rspec not available to run tests. Install it with: gem install rspec --pre"
  puts e
  puts e.backtrace
end
Something went wrong with that request. Please try again.