The Rubyspecs: Quick Starting Guide
This is a quick guide for those, who’d like to run the Rubyspecs with minimal effort. For those who have JRuby repository checked out, the steps are even easier: ‘ant spec’ – and you’ll run all the unexcluded specs against the freshly built JRuby.
- Pull the Rubinius repository (and you have to have git for that):
1: git clone git://git.rubini.us/code rbx - Alternatively, you could just download the snapshot of the repository in a compressed file. (Look for “snapshot” links at the page).
- Basically, that’s it for the setup. Now, just run the tests:
1: cd rbx # Step into the directory you've created when pulled2: bin/mspec -t ruby spec/ruby/1.8 # Run all Ruby 1.8 specs3: bin/mspec -t ruby spec/ruby/1.8/core/kernel # Run Kernel specs4: bin/mspec -f s -t ruby spec/ruby/1.8 # More verbose output - During the execution, the dots will be printed out, and the final summary, but with “-f s” option, the output is much more interesting:
1: Kernel.proc2: - returns a Proc3: - raises an ArgumentError when no block given4: - raises an ArgumentError when given too many arguments5: - returns from block into caller block
So, that’s about it. The rubyspec format is compatible with Rspec, so there should be no major surprises there. More info *is* available at the official page. I’d suggest to start with “Specs – Overview” and explore from there.
April 27th, 2008 at 7:49 pm
[...] The Rubyspecs: Quick Starting Guide [...]