[rspec-users] RSpec 0.7.5 with Rails and rcov
eastmedianyc at gmail.com
Mon Jan 15 00:04:56 EST 2007
> Le 5 janv. 07 à 03:05, Bryan Liles a écrit :
> > I seem to be missing something because I am at a loss on how to get
> > rcov, RSpec, and Rails working together. Would someone mind dropping
> > some hints?
> I don't know what you want to achieve, but if your goal is to
> generate some reports here's what I added to lib/tasks/
> rspec_additions.rake :
> namespace :spec do
> desc "Spec with rspec/rcov reports"
> Spec::Rake::SpecTask.new('reports') do |t|
> t.spec_files = FileList['spec/**/*.rb']
> t.spec_opts = ["--format", "html", "--diff"]
> t.out = 'doc/rspec.html'
> t.rcov = true
> t.rcov_dir = 'doc/coverage'
> # Optional :
> # Prevent rcov to generate report on specs, environment.rb and boot.rb
> # t.rcov_opts = ['--exclude', 'spec,config\/environment.rb,config\/
> t.fail_on_error = false
> t.failure_message = "The specs failed. Check for the problem at
> Run it with rake : spec:reports
> It will generate rspec.html report in doc/rspec.html and rcov report
> in doc/coverage/.
This results in a bus error in OSX 10.4.8 (I had a similar task that
did the same thing):
[BUG] Bus Error
ruby 1.8.5 (2006-08-25) [i686-darwin8.8.1]
I'm running Rails 1.2 in vendor/rails
Anyone else getting this? Any idea why? Thanks.
> Tron Jonathan
More information about the rspec-users