Sha256: 86e4b16af70d7e0e0782e184b0f644beb33a0c7d72e21d4e3051c3ee544853c9

Contents?: true

Size: 1.08 KB

Versions: 16

Compression:

Stored size: 1.08 KB

Contents

namespace :blacklight do
  begin
    require 'rspec/core'
    require 'rspec/core/rake_task'

    desc "Run Blacklight rspec, with test solr"
    task :all_tests => :hudson

    desc "Run Blacklight rspec, with test solr"
    task :hudson do
      Rails.env = 'test' unless ENV['RAILS_ENV']

      error = Jettywrapper.wrap(Jettywrapper.load_config) do
          Rake::Task["blacklight:spec"].invoke 
      end

      raise "test failures: #{error}" if error
    end
    
    namespace :all_tests do
      task :rcov do
      desc "Run Blacklight rspec tests with rcov"

      rm "blacklight-coverage.data" if File.exist?("blacklight-coverage.data")
      Rails.env = 'test' unless ENV['RAILS_ENV']
      error = Jettywrapper.wrap(Jettywrapper.load_config) do          
          Rake::Task["blacklight:spec:rcov"].invoke 
      end             
      raise "test failures: #{error}" if error
    end
  end
    
  rescue LoadError
    desc "Not available! (rspec not avail)"
    task :all_tests do
      abort 'Not available. Rspec needs to be installed to run blacklight:all_tests'
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
blacklight-4.9.0 lib/railties/all_tests.rake
blacklight-4.8.0 lib/railties/all_tests.rake
blacklight-4.7.0 lib/railties/all_tests.rake
blacklight-4.7.0.pre1 lib/railties/all_tests.rake
blacklight-4.6.3 lib/railties/all_tests.rake
blacklight-5.0.0.pre3 lib/railties/all_tests.rake
blacklight-4.6.2 lib/railties/all_tests.rake
blacklight-5.0.0.pre2 lib/railties/all_tests.rake
blacklight-4.6.1 lib/railties/all_tests.rake
blacklight-5.0.0.pre1 lib/railties/all_tests.rake
blacklight-4.6.0 lib/railties/all_tests.rake
blacklight-4.5.0 lib/railties/all_tests.rake
blacklight-4.5.0.rc1 lib/railties/all_tests.rake
blacklight-4.4.2 lib/railties/all_tests.rake
blacklight-4.4.1 lib/railties/all_tests.rake
blacklight-4.4.0 lib/railties/all_tests.rake