[Chirb] tools, already in play and coming soon
Ryan Platte
ryan at platte.name
Wed Jun 11 09:37:35 EDT 2008
Here are some Rake tasks I created to use RSpec with UnitRecord. I set the
default task to first run spec:fast, then spec:slow, so if the fast ones
fail we don't have to wait on the slow ones to set up and run.
The fly in the ointment is that schema.rb has to be current.
namespace :spec do
desc "Run all fast specs in spec directory (excluding plugin specs)"
Spec::Rake::SpecTask.new(:fast) do |t|
t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
t.spec_files = FileList['spec/**/*_fast_spec.rb']
#t.ruby_opts = ['-r spec/spec_helper', '-rubygems', '-runit_record', "-e
'ActiveRecord::Base.disconnect!'"]
end
desc "Run all non-fast specs in spec directory (excluding plugin specs)"
Spec::Rake::SpecTask.new(:slow => spec_prereq) do |t|
t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
t.spec_files =
FileList['spec/**/*_spec.rb'].exclude('spec/**/*_fast_spec.rb')
end
end
On Wed, Jun 11, 2008 at 1:36 AM, David Chelimsky <dchelimsky at gmail.com>
wrote:
> On Jun 9, 2008, at 11:31 PM, David Chelimsky wrote:
>
> Hey Chirb,
>>
>> Lastly, I may have mis-spoke about rails loading up columns from schema.rb
>> - I'm looking into it and will follow up when I learn the truth. So Ryan -
>> keep using unit-record for now :)
>>
>
> I definitely mis-spoke. I don't know where I got that in my head, but it
> seems I did.
>
> I don't recall who said it, but unit_record does the column caching I
> thought rails did. So now it's off to figure out how to get rspec to play
> nice w/ unit_record.
>
> More soon.
>
>
> Cheers,
> David
> _______________________________________________
> ChicagoGroup-Members-List at rubyforge.org
> http://rubyforge.org/mailman/listinfo/chicagogroup-members-list
>
--
Ryan Platte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/chicagogroup-members-list/attachments/20080611/2bfb3a1f/attachment.html>
More information about the ChicagoGroup-Members-List
mailing list