Sha256: 37ea407c9568431a1e53aec7e0c819820f7664152cdb97671dda65c916711e55

Contents?: true

Size: 966 Bytes

Versions: 6

Compression:

Stored size: 966 Bytes

Contents

require 'rspec/core/rake_task'
require 'rake/clean'

CLOBBER.include('coverage', 'specdoc')

namespace :spec do

  RSpec::Core::RakeTask.new(:normal) do |t|
    t.pattern = FileList['spec/**/*_spec.rb'].exclude(/compat/)
    t.rspec_opts = ['--color', '--format', 'documentation']
  end

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

  desc "Generate HTML Specdocs for all specs"
  RSpec::Core::RakeTask.new(:specdoc) do |t|
    specdoc_path = File.expand_path(
      File.join(File.dirname(__FILE__), '..', 'documentation')
    )
    Dir.mkdir(specdoc_path) if !File.exist?(specdoc_path)

    output_file = File.join(specdoc_path, 'index.html')
    t.pattern = FileList['spec/**/*_spec.rb']
    t.rspec_opts = ["--format", "\"html:#{output_file}\"", "--diff"]
    t.fail_on_error = false
  end

end

desc "Alias to spec:normal"
task "spec" => "spec:normal"

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
signet-0.7.3 tasks/spec.rake
signet-0.7.2 tasks/spec.rake
signet-0.7.1 tasks/spec.rake
signet-0.7.0 tasks/spec.rake
signet-0.6.1 tasks/spec.rake
signet-0.6.0 tasks/spec.rake