Sha256: 50c27458fbbb025eae267613f6471f43043885f9d7aab4fa6eb4c501022e21a3
Contents?: true
Size: 1.06 KB
Versions: 11
Compression:
Stored size: 1.06 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 --rails --exclude "spec/*,application_controller.rb,application_helper.rb"'] end end end
Version data entries
11 entries across 11 versions & 2 rubygems