Sha256: b4902b5ced0e762806b330326ad30c6ce2df84a4c371d3af35ffc3c760d5f133

Contents?: true

Size: 899 Bytes

Versions: 8

Compression:

Stored size: 899 Bytes

Contents

begin
  require 'ci/reporter/rake/rspec'
  require 'ci/reporter/rake/cucumber'

  namespace :ci do

    ENV["DATABASE_ENV"] = 'test'

    namespace :setup do
      
      @reports_dir = ENV['CI_REPORTS'] || 'features/reports'
      
      task :cucumber_report_cleanup do
        rm_rf @reports_dir
      end

      task :cucumber => :cucumber_report_cleanup do
        extra_opts = "--format junit --out #{@reports_dir}"
        ENV["CUCUMBER_OPTS"] = "features/ #{ENV['CUCUMBER_OPTS']} #{extra_opts}"
      end

    end
    
    task "spec" => ["rspec_run"]
    task "cucumber" => ["cucumber_run"]
    
  end

  task "ci" => ["db:migrate", "ci:spec", "ci:cucumber"]
rescue LoadError
  # ci_reporter isn't here for some reason
end

RSpec::Core::RakeTask.new(:rspec_run => ["ci:setup:rspec"]) do |t|
  t.pattern = '**/*_spec.rb'
end

Cucumber::Rake::Task.new(:cucumber_run => ["ci:setup:cucumber"])

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
active_metadata-0.5.2 lib/rake/ci.rb
active_metadata-0.5.1 lib/rake/ci.rb
active_metadata-0.5.0 lib/rake/ci.rb
active_metadata-0.4.2 lib/rake/ci.rb
active_metadata-0.4.1 lib/rake/ci.rb
active_metadata-0.3.2 lib/rake/ci.rb
active_metadata-0.3.1 lib/rake/ci.rb
active_metadata-0.3.0 lib/rake/ci.rb