how to make and run new tests for a patch?

craigmcc created this patch that fixes an outstanding problem in ActiveResource.

   http://dev.rubyonrails.org/ticket/8798

I'm using it because it fixes something that was working and now is broken in edge.

I'd like to write some tests for the patch to make it more likely to get accepted. There's lots of great examples of tests but I'm stuck on a stupid problem.

How do I run the rails specific tests? I know how to run tests for my app but not how to run the tests for rails itself.

This page: http://wiki.rubyonrails.org/rails/pages/PatchRequirements has a list of what the requirements are for a patch but no links to specific examples/best practices about how to write and run the tests.

Thanks

Get the SVN tree as per http://dev.rubyonrails.org/:

  svn checkout http://svn.rubyonrails/rails/trunk
  
Go into the activeresource directory:

  cd trunk/activeresource
  
Then run rake:

  rake
  
That'll run the test suite for you.

To make new tests, you want to modify
trunk/activeresource/test/base_test.rb. Surprisingly, there aren't any
tests yet that exercise instantiate_collection directly, so you'll want to
start a new test method and go from there.

- Matt