Sha256: dcf211552a6bdfc4826f59e672705360ea57b794e9bb33403d291b3373f2232d

Contents?: true

Size: 982 Bytes

Versions: 1

Compression:

Stored size: 982 Bytes

Contents

ENV['BUNDLE_GEMFILE'] = File.dirname(__FILE__) + '/../Gemfile'

require 'rake'
require 'rake/testtask'
require 'rspec'
require 'rspec/core/rake_task'

desc "Run the test suite"
task :spec => ['spec:setup', 'spec:hikari_lib', 'spec:cleanup']

namespace :spec do
  desc "Setup the test environment"
  task :setup do
  end
  
  desc "Cleanup the test environment"
  task :cleanup do
    File.delete(File.expand_path(File.dirname(__FILE__) + '/../spec/test.db'))
  end
  
  desc "Test hikari"
  RSpec::Core::RakeTask.new(:hikari_lib) do |task|
    hikari_root = File.expand_path(File.dirname(__FILE__) + '/..')
    task.pattern = hikari_root + '/spec/lib/**/*_spec.rb'
  end

  desc "Run the coverage report"
  RSpec::Core::RakeTask.new(:rcov) do |task|
    hikari_root = File.expand_path(File.dirname(__FILE__) + '/..')
    task.pattern = hikari_root + '/spec/lib/**/*_spec.rb'
    task.rcov=true
    task.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/,features\/}
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hikari-0.5.0 tasks/spec.rake