From 3eebc143afd7a1d967fbf939e0f20a00a37a0337 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Thu, 28 Mar 2013 17:52:23 +0100 Subject: contrib guide: documents how to generate a --dev application --- guides/source/contributing_to_ruby_on_rails.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'guides/source/contributing_to_ruby_on_rails.md') diff --git a/guides/source/contributing_to_ruby_on_rails.md b/guides/source/contributing_to_ruby_on_rails.md index cc4e369e7d..e1827ffac0 100644 --- a/guides/source/contributing_to_ruby_on_rails.md +++ b/guides/source/contributing_to_ruby_on_rails.md @@ -53,6 +53,22 @@ The easiest and recommended way to get a development environment ready to hack i In case you can't use the Rails development box, see section above, check [this other guide](development_dependencies_install.html). + +Running an Application Against Your Local Branch +------------------------------------------------ + +The `--dev` flag of `rails new` generates an application that uses your local +branch: + +```bash +$ cd rails +$ bundle exec rails new ~/my-test-app --dev +``` + +The application generated in `~/my-test-app` runs against your local branch +and in particular sees any modifications upon server reboot. + + Testing Active Record --------------------- -- cgit v1.2.3 From b77b95eaa27a38ade8ddeb7c5b9a816cc41a1590 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Thu, 28 Mar 2013 18:04:32 +0100 Subject: contrib guide: documents guidelines for running the test suite --- guides/source/contributing_to_ruby_on_rails.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'guides/source/contributing_to_ruby_on_rails.md') diff --git a/guides/source/contributing_to_ruby_on_rails.md b/guides/source/contributing_to_ruby_on_rails.md index e1827ffac0..575168a775 100644 --- a/guides/source/contributing_to_ruby_on_rails.md +++ b/guides/source/contributing_to_ruby_on_rails.md @@ -217,6 +217,17 @@ Now get busy and add or edit code. You’re on your branch now, so you can write * Include tests that fail without your code, and pass with it. * Update the (surrounding) documentation, examples elsewhere, and the guides: whatever is affected by your contribution. +It is not customary in Rails to run the full test suite before pushing +changes. The railties test suite in particular takes a long time, and even +more if the source code is mounted in `/vagrant` as happens in the recommended +workflow with the [rails-dev-box](https://github.com/rails/rails-dev-box). + +As a compromise, test what your code obviously affects, and if the change is +not in railties run the whole test suite of the affected component. If all is +green that's enough to propose your contribution. We have [Travis CI](https +://travis-ci.org/) as a safety net for catching unexpected breakages +elsewhere. + TIP: Changes that are cosmetic in nature and do not add anything substantial to the stability, functionality, or testability of Rails will generally not be accepted. ### Follow the Coding Conventions -- cgit v1.2.3