0
我想使用RSpec的CruiseControl.rb(版本2.0.0pre1)为我的Ruby on Rails 3应用程序。该cruise_config.rb
为我的项目是这样的:CruiseControl.rb与RSpec:Rake任务'规范'未找到
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
但是当我尝试运行使用CruiseControl构建,它说:
rake aborted!
Custom rake task(s) 'spec' not defined
Tasks: TOP => cc:build
(See full trace by running task with --trace)
它无法找到该规范rake任务运行的RSpec试验。我也试图定义我Rakefile
内自定义rake任务和删除project.rake_task = 'db:migrate db:test:prepare spec'
线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
如果我这样做,CruiseControl的说
rake aborted!
ActiveRecord::ConnectionNotEstablished
Tasks: TOP => cruise
(See full trace by running task with --trace)
[CruiseControl] Invoking Rake task "cruise"
Custom Rake task
有谁知道CruiseControl.rb与合作RSpec的?
冷静,这有助于。谢谢! – 23tux 2012-02-25 09:22:09
还有一个问题,也许你可以提供帮助:当我通过在cruise_config.rb中指定'project.rake_task ='spec'''来执行cruisecontrol的测试时,即使测试失败,巡航控制也会通过构建。我读了一些关于exti身份的信息,但没有任何帮助。 – 23tux 2012-02-27 09:26:33
我不使用巡航控制,对不起 – farnoy 2012-02-27 15:21:00