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.

  1. Pull the Rubinius repository (and you have to have git for that):
       1: git clone git://git.rubini.us/code rbx
  2. Alternatively, you could just download the snapshot of the repository in a compressed file. (Look for “snapshot” links at the page).
  3. Basically, that’s it for the setup. Now, just run the tests:
       1: cd rbx  # Step into the directory you’ve created when pulled
       2: bin/mspec -t ruby spec/ruby/1.8 # Run all Ruby 1.8 specs
       3: bin/mspec -t ruby spec/ruby/1.8/core/kernel # Run Kernel specs
       4: bin/mspec -f s -t ruby spec/ruby/1.8 # More verbose output
  4. 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.proc
       2: - returns a Proc
       3: - raises an ArgumentError when no block given
       4: - raises an ArgumentError when given too many arguments
       5: - 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.

One Response to “The Rubyspecs: Quick Starting Guide”

  1. The value of the RubySpecs - The Empty Way Says:

    [...] The Rubyspecs: Quick Starting Guide [...]

Leave a Reply