Railsters:
Put this into a *.rake file, and invoke it from a command line as
"rake test:svn_recent":
require ''fileutils''
task ''test:svn_recent'' do
`svn status`.
split("\n").
map{|f| f =~ /^M\s+(.*_test.rb)/; $1 }.
compact.
each do |uncommitted|
FileUtils.touch uncommitted
end
Rake::Task[''test:recent''].invoke
end
It finds every SVN file with a status of M (due to Subversion''s stated
goal to support absurdly easy grep-based scripting), and touches this
file. Then it invokes the normal test:recent run, which adds files to
the test list if their modification time is newer than 10 minutes ago.
For a good time, we could also add the ability to find every modified
source file, find its matching *_test.rb, and trigger it. That
behavior is allegedly in test:recent too, but I have never seen it
working. It should be very easy to add to this system.
--
Phlip
http://www.oreilly.com/catalog/9780596510657/
"Test Driven Ajax (on Rails)"
assert_xpath, assert_javascript, & assert_ajax
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---