Hi Chad,
Finally got my rspec test cases run.
Thanks a lot for your guidance.
What i did is i followed the first point.i run the pending migrations and
just build the project.
It succeeded.

On Tue, Jan 19, 2010 at 5:54 PM, Amit Kulkarni
<[email protected]>wrote:

> Hi,
> I tried your sugesstion but something is going wrong.I am missing
> something.
> In "./cruise/projects/testproject/cruise_config.rb " i have define custom
> rake task as:
>  project.rake_task = 'spec:conrollers'
>
> Now after building the project again it is saying me that i have some
> pending migrations remaing but if i checked my database then those fields
> are already present.Is there any way to comment this line temporary so that
> i can check whether it is executing controller spec or not.
>
> Also second thing which i tried is that under
> cruisecontrol.rb/tasks/cc_build.rake i have added the line
>  #  invoke 'test' or 'default' task
>       if Rake.application.lookup('spec:controllers')
>         CruiseControl::invoke_rake_task 'spec:controllers'
>       elsif Rake.application.lookup('default')
>         CruiseControl::invoke_rake_task 'default'
>       else
>        raise "'cruise', test' or 'default' tasks not found. CruiseControl
> doesn't know what to build."
>       end
>
> I commented the project.rake_task = 'spec:conrollers' under
> ./cruise/projects/testproject/cruise_config.rb ".When i build then i get an
> error Mysql::Error: No database selected: SHOW TABLES.
> Any suggestions..
>
>
> On Fri, Jan 15, 2010 at 9:45 PM, Chad Woolley <[email protected]>wrote:
>
>> On Fri, Jan 15, 2010 at 5:13 AM, Amit Kulkarni
>> <[email protected]> wrote:
>> > Thanks a lot.It worked.
>> > But i got some error in migrations which i will figure it out.
>> > Also i have some queries which are as follows:
>> > 1: How do i point it to my Rspec test cases?
>>
>> Your project's default rake task should run your rspec tests, if that
>> is what you want.  If that isn't happening, fix it in your project -
>> it has nothing to do with ccrb.
>>
>> > 2: By default it takes production environment?Can we change this to test
>> > environment?Or should we run the cruise control always in production
>> > environment?
>> > Since Rspec uses test environment how can we do this in cruisecontrol?
>>
>> Cruise itself runs in production environment.  Your project's default
>> rake task should run your rspec tests in the test environment.
>>
>> > 3: If the build is failed we get mail.Can we get mail if the build is
>> passed
>> > along with all the tests?
>>
>> You will get a mail on the first successful build after a failed
>> build.  There's really no point to getting one for every successful
>> build, that's just noise.
>> _______________________________________________
>> Cruisecontrolrb-users mailing list
>> [email protected]
>> http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users
>>
>
>
_______________________________________________
Cruisecontrolrb-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users

Reply via email to