I wanted to do the same, but with rspec and autospec, and it took a little digging to figure out where they get the list of directories / file templates that dictated the launch of the test files. I eventually found this in lib / tasks / rspec.rake: 86
[:models, :controllers, :views, :helpers, :lib, :integration].each do |sub| desc "Run the code examples in spec/#{sub}" Spec::Rake::SpecTask.new(sub => spec_prereq) do |t| t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""] t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"] end end
I put my tests in the new spec / libs directory when the rpsec.rake file was set up for viewing in spec / lib. Just renaming libs -> lib did the trick!
ae35unit Jun 30 '10 at 21:02 2010-06-30 21:02
source share