[katello-devel] Faster unit tests
Ivan Nečas
inecas at redhat.com
Thu Aug 11 16:21:55 UTC 2011
On 08/11/2011 06:04 PM, Jason Rist wrote:
>> That's because rake spec clears and loads the whole schema again, while
>> rspec does not.
>>
>> OTOH it means, that if you have some data in test db, rake spec clears
>> it and rspec keeps it there. Since tests are run
>> in transactions and db is rolled back at the of each test, the clearing
>> of the before running tests is not necessary.
>>
>> Ivan
>>
> That's only if people are writing really well behaved tests... :)
>
> -J
>
config.use_transactional_fixtures = true
in spec_helper should do the trick most of the time :)
I
--
Regards,
Ivan Necas
RHN Satellite Engineering
Red Hat Czech s.r.o. Brno
More information about the katello-devel
mailing list