[rspec-users] rspec with CI

Marcus Crafter
2007-04-18T04:54:37Z

Hi Alex,

Thanks for that - I ended up fixing the RAILS_ENV to ''test'' in
the
project''s Rakefile directly which also got it working, for some
reason my lib/tasks/cruise.task wasn''t being picked up but at least
it''s all working now.

Thanks again for your help mate. Much appreciated :)

Cheers,

Marcus

On 18/04/2007, at 2:32 PM, Alex Edwards wrote:

> Marcus,
> I have now got my specs working in CI, and have also found that you
> can make cruise run under the ''test'' environment by:
> cruise start -e test
>
> Hope this helps you get around your problem.
>
> Marcus Crafter wrote:
>> Hi Alex, I''m having a similar problem with CC.rb at the moment
-
>> from what I can see, CC.rb is trying to run my spec''s using
the
>> production database, rather than the test one: 1)
>> ActiveRecord::StatementInvalid in ''A new Activation object
should
>> be invalid without a name'' Mysql::Error: Table
>> ''cms_production.activations'' doesn''t exist:
SHOW FIELDS FROM
>> activations ./spec/models/activation_spec.rb:7: ... Naturally this
>> causes all of the specs to fail. :-/ Running the same ''rake
spec''
>> on the command line in my rails app works as expected. I don''t
>> have a solution just yet but have also asked if others were having
>> this problem on the cc.rb users mailing list - hopefully we''ll
>> have a solution to it soon. If this isn''t the problem
you''re
>> having - would be good to know so we can sort that out too. At
>> least you''re not the only one :) Cheers, Marcus On 17/04/2007,
at
>> 12:23 PM, Alex Edwards wrote:
>>> I am a bit of a rails and rspec noob. I am trying to use rspec in
>>> conjunction with CruiseControlrb. When I run a cruise build
>>> having spec errors, the build does not indicate a failure. I have
>>> tried to track down why this is the case, and my best guess is
>>> that the spec task is kicking off the spec via a ruby() method in
>>> rake, and that ruby method does not propagate my spec failure
>>> back to rake. Any help in setting this up would be much
>>> appreciated. Also, if there is a better alternative to
>>> cruisecontrolrb that integrates nicely with rspec, please let me
>>> know. Thanks _______________________________________________
>>> 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