development full of
merriment and sense

test/spec docs for Rails

Geoffrey on February 24, 2008 at 12:35 am

map
photo by Kriston Lewis

I am a big RSpec fan. But occasionally, I work on projects that use test/spec. When I want output the spec documentation with RSpec, I just use rake spec:doc. With test/spec, I couldn’t find such a thing. So I made one and stuck it in lib/tasks/test_spec.rake


Rake::TestTask.new(:specdox) do |t|
  t.options = '--runner=specdox'
  t.libs << 'test'
  t.pattern = 'test/**/*_test.rb'
  t.verbose = true
end
Rake::Task[:specdox].comment = "Generate specdox."

Now I can use rake specdox to see all the wonderful spec documentation!

Filed under: RSpec, Testing, documentation, test/spec

No Comments »

No comments yet.

RSS feed for comments on this post.
TrackBack URL

Leave a comment




  • gdagley on Twitter

  • gdagley on del.icio.us

Powered by WordPress