From 6de3f1fb4e3160d0ab8f986ebe9287ce1a19aab0 Mon Sep 17 00:00:00 2001 From: Ilya Zayats Date: Sat, 26 Feb 2011 07:49:50 +0300 Subject: added information about TEST_DIR env variable --- railties/guides/source/contributing_to_ruby_on_rails.textile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'railties/guides/source/contributing_to_ruby_on_rails.textile') diff --git a/railties/guides/source/contributing_to_ruby_on_rails.textile b/railties/guides/source/contributing_to_ruby_on_rails.textile index 1977f8d0ce..e00b26f948 100644 --- a/railties/guides/source/contributing_to_ruby_on_rails.textile +++ b/railties/guides/source/contributing_to_ruby_on_rails.textile @@ -101,6 +101,14 @@ $ cd actionpack $ rake test +If you want to run tests from the specific directory use the +TEST_DIR+ environment variable. For example, this will run tests inside +railties/test/generators+ directory only: + + +$ cd railties +$ TEST_DIR=generators rake test + + + h4. Warnings The test suite runs with warnings enabled. Ideally Ruby on Rails should issue no warning, but there may be a few, and also some from third-party libraries. Please ignore (or fix!) them if any, and submit patches that do not issue new warnings. -- cgit v1.2.3 From 819762c90f9f49e92dd555a89f0e865f9bab9838 Mon Sep 17 00:00:00 2001 From: Lars Smit Date: Mon, 28 Feb 2011 12:17:26 +0100 Subject: Added some new advice on applying patches --- .../guides/source/contributing_to_ruby_on_rails.textile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'railties/guides/source/contributing_to_ruby_on_rails.textile') diff --git a/railties/guides/source/contributing_to_ruby_on_rails.textile b/railties/guides/source/contributing_to_ruby_on_rails.textile index e00b26f948..9739da2666 100644 --- a/railties/guides/source/contributing_to_ruby_on_rails.textile +++ b/railties/guides/source/contributing_to_ruby_on_rails.textile @@ -351,6 +351,20 @@ $ git format-patch master --stdout > my_new_patch.diff Sanity check the results of this operation: open the diff file in your text editor of choice and make sure that no unintended changes crept in. +You can check your patches by applying your patch to an different dedicated branch: + + +$ git checkout -b testing_branch +$ git apply --check my_new_patch.diff + + +You can make sure your patches don't add any whitespace by applying it yourself using the --whitespace=error-all option. Make sure you are on your dedicated test branche and: + + +$ git apply --whitespace=error-all mynew_patch.diff + + + h4. Create a Lighthouse Ticket Now create a ticket with your patch. Go to the "new ticket":http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/new page at Lighthouse. Fill in a reasonable title and description, remember to attach your patch file, and tag the ticket with the ‘patch’ tag and whatever other subject area tags make sense. -- cgit v1.2.3