[rspec-users] rSpec on CruiseControl.rb

s.ross cwdinfo at gmail.com
Thu May 3 14:30:25 EDT 2007


I'll answer my own question. This seems to work ok:

require File.join(RAILS_ROOT, '/vendor/plugins/rspec/lib/spec/rake/ 
spectask')

task :cruise do
   Rake::Task["cruise_spec"].invoke
end

Spec::Rake::SpecTask.new(:cruise_spec) do |t|
   t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
   t.spec_files = FileList['spec/**/*_spec.rb']
end

The formatting isn't great, but it succeeds when it should and fails  
when a bad checkin is made.

On May 3, 2007, at 9:45 AM, Matthijs Langenberg wrote:

> I didn't have any troubles to get it working at all, I just created a
> Rakefile with a custom 'cruise' task:
>
> require 'rake'
> require 'spec/rake/spectask'
>
> task :cruise do
>   Rake::Task["spec"].invoke
> end
>
> Spec::Rake::SpecTask.new do |t|
>   t.spec_opts = ['-f s']
>   t.spec_files = 'SMSer_spec.rb'
> end
>
> What problems are you running into, or are you talking about a  
> Rails project?
>
> On 5/3/07, s. ross <cwdinfo at gmail.com> wrote:
>> Has anyone gotten CC to use rSpec as a builder? There was some
>> comment on their list about this in February, but I wondered if
>> anyone here is using CC (or is there some other ci tool that might be
>> more suitable)?
>>
>> Thx
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
>>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users



More information about the rspec-users mailing list