Domanda

Sto cercando di usare CruiseControl.rb (ver. 2.0.0PRE1) con RSPEC per la mia app Ruby on Rails 3. Il cruise_config.rb Per il mio progetto sembra questo:

Project.configure do |project|
  project.rake_task = 'db:migrate db:test:prepare spec'
  project.scheduler.polling_interval = 1.hour
  project.scheduler.always_build = false
end

Ma quando provo a eseguire una build con CruiseControl, dice:

rake aborted!
Custom rake task(s) 'spec' not defined

Tasks: TOP => cc:build
(See full trace by running task with --trace)

Non riesce a trovare l'attività di rastrello SPEC per eseguire i test RSPEC. Ho anche provato a definire un'attività di rastrello personalizzato all'interno del mio Rakefile e rimosso il project.rake_task = 'db:migrate db:test:prepare spec' linea all'interno del cruise_config.rb:

desc "Custom Task for CruiseControl.rb"
task :cruise do
  puts "Custom Rake task"
  Rake::Task['db:migrate'].execute
  Rake::Task['db:test:prepare'].execute
  Rake::Task['spec'].execute
end

Se lo faccio, dice CruiseControl

rake aborted!
ActiveRecord::ConnectionNotEstablished

Tasks: TOP => cruise
(See full trace by running task with --trace)
[CruiseControl] Invoking Rake task "cruise"
Custom Rake task

Qualcuno ha CruiseControl.rb che lavora con RSPEC?

È stato utile?

Soluzione

Assicurati di avere il :spec attività definita nel tuo Rakefile, per RSpec 2, sembra questo:

require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec)
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top