Sha256: 1dc3d046a22cc7c04255c9343b8ff9769623f9fa035abe2204cd04addc27024a

Contents?: true

Size: 1 KB

Versions: 2

Compression:

Stored size: 1 KB

Contents

# Don't load rspec if running "rake gems:*"
unless ARGV.any? {|a| a =~ /^gems/}

begin
  require 'spec/rake/spectask'
rescue MissingSourceFile
  module Spec
    module Rake
      class SpecTask
        def initialize(name)
          task name do
            raise <<-MSG

#{"*" * 80}
*  You are trying to run an rspec rake task defined in
*  #{__FILE__},
*  but rspec cannot be found.
#{"*" * 80}
MSG
          end
        end
      end
    end
  end
end

task :default => :spec

desc "Run all specs in spec directory (excluding plugin specs)"
Spec::Rake::SpecTask.new(:spec) do |t|
  t.spec_opts = ['--colour --format progress --loadby mtime --reverse']
  t.spec_files = FileList['spec/**/*_spec.rb']
end

namespace :spec do
  desc "Run all specs in spec directory with RCov"
  Spec::Rake::SpecTask.new(:rcov) do |t|
    t.spec_opts = ['--colour --format progress --loadby mtime --reverse']
    t.spec_files = FileList['spec/**/*_spec.rb']
    t.rcov = true
    t.rcov_opts = ['--text-report --exclude "spec/*"']
  end
end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
credentials-2.1.0 tasks/spec.rake
credentials-2.0.0 tasks/spec.rake