test/spec docs for Rails

24 Feb 2008
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
Rake::Task[:specdox].comment = "Generate specdox."
Now I can use rake specdox to see all the wonderful spec documentation!

blog comments powered by Disqus