Sha256: 06898898f54ac6d9433309dbefdafe570a48a6a722b12117a22b241b9f942c25

Contents?: true

Size: 851 Bytes

Versions: 2

Compression:

Stored size: 851 Bytes

Contents

module RStack
  class RSpec
    def self.define_tasks(configuration)
      ::Spec::Rake::SpecTask.new do |t|        
        t.spec_opts = if File.exist?('spec/spec.opts')
          ['-O', 'spec/spec.opts' ]
        else
          ['--format', 'specdoc', '--diff', '--color']
        end
        t.spec_files = configuration.spec_files
      end
      
      desc "Run specs through RCov and generate HTML reports"
      ::Spec::Rake::SpecTask.new('spec:with_coverage') do |t|
        t.rcov_dir      = configuration.outpath / 'coverage'
        t.spec_files    = configuration.spec_files
        t.spec_opts     = ["--format", "html:#{configuration.outpath}/spec_report.html", "--diff"]
        t.fail_on_error = false
        t.rcov          = true
        t.rcov_opts << '--no-rcovrt' # required or rcov will fail
      end      
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jrun-rstack-0.5.2 lib/rstack/tasks/rspec.rb
jrun-rstack-0.5.4 lib/rstack/tasks/rspec.rb