Sha256: 857cedf8f2247a17c347a83114fef1a81a0d819520b4d08cf1e48bf6a6404ac2

Contents?: true

Size: 918 Bytes

Versions: 13

Compression:

Stored size: 918 Bytes

Contents

require 'bundler/gem_tasks'
require 'rake'
require 'rspec/core/rake_task'

RCOV = RUBY_VERSION.to_f == 1.8

namespace :spec do

  RSpec::Core::RakeTask.new(:coverage) do |t|
    t.pattern = 'spec/**/*_spec.rb'

    if RCOV
      t.rcov = true
      t.rcov_opts = '--exclude osx\/objc,spec,gems\/'
    end
  end

  RSpec::Core::RakeTask.new(:normal) do |t|
    t.pattern ='spec/**/*_spec.rb'
    t.rcov = false
  end

  namespace :coverage do
    desc "Cleanup coverage data"
    task :cleanup do
      rm_rf 'coverage.data'
      rm_rf 'coverage'
    end

    desc "Browse the code coverage report."
    task :report => ["spec:coverage:cleanup", "spec:coverage"] do
      if RCOV
        require "launchy"
        Launchy.open("coverage/index.html")
      else
        require 'cover_me'
        CoverMe.complete!
      end
    end
  end

end

desc "RSpec tests"
task "spec" => "spec:normal"

task "default" => "spec"

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
draper-0.18.0 Rakefile
draper-0.17.0 Rakefile
draper-0.16.0 Rakefile
draper-0.15.0 Rakefile
draper-0.15.0rc1 Rakefile
draper-0.14.0 Rakefile
draper-0.12.3 Rakefile
draper-0.12.2 Rakefile
draper-0.13.0 Rakefile
draper-0.12.1 Rakefile
draper-0.12.0 Rakefile
draper-0.11.1 Rakefile
draper-0.11.0 Rakefile