This repo will help you to set up everything you need to get the Rails Test Suite running in an isolated environment. It does not require you to set up mysql, postgresql, etc., it will do that for you within a VirtualBox thanks to Vagrant. The good thing is that it uses RVM which makes it even possible to run the test suite against different versions of Ruby. This repositories contains everything you need to be a Rails Core contributor in no-time. And the good thing is you can keep using your favorite IDE, because the rails directory is shared!
After you have ran through the instructions below you'll be able to run the complete Rails Test Suite.
If you are only interested in getting the Box up and running quickly copy the commands from this gist. This will skip all the compiling time and the only thing you pretty much have to wait for is downloading the box.
First install Virtualbox
Clone this repository
git clone git://github.com/jeroenvandijk/rails_test_box.git
cd rails_test_box
git submodule update --init
Install necessary gems:
bundle install
If you don't have a base box yet you might want to use the base box of the Vagrant guys (Thank you!)
bundle exec vagrant box add base http://files.vagrantup.com/base.box
Set up the box
bundle exec vagrant up
Wait a while until your box is ready and start running the tests:
bundle exec vagrant ssh
cd rails
rake
Everything should pass. Now you can start patching Rails and run the tests again. See http://guides.rails.info/contributing_to_rails.html for more info.
When you have wrecked your box or if you just want to update everything without worrying if something would conflict, you can do the following in the directory where you did the original checkout of this box:
bundle exec vagrant destroy
git pull
git submodule update
bundle exec vagrant up
Jeroen van Dijk
The MIT License
Copyright (c) 2010 Jeroen van Dijk
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.