Getting Started
Version 18 (Brian Ford, 02/11/2009 02:47 PM)
| 1 | 1 | h1. Getting Started |
|
|---|---|---|---|
| 2 | 2 | Brian Ford | |
| 3 | 13 | Brian Ford | To run the RubySpecs, you need to get MSpec and the RubySpec files. |
| 4 | 13 | Brian Ford | |
| 5 | 12 | Brian Ford | h2. Getting MSpec |
| 6 | 2 | Brian Ford | |
| 7 | 13 | Brian Ford | MSpec is the framework and scripts for running the RubySpecs. It is available as a gem or directly from "Github":http://github.com/rubyspec/mspec/tree/master. |
| 8 | 13 | Brian Ford | |
| 9 | 13 | Brian Ford | |
| 10 | 15 | Brian Ford | $ sudo gem install mspec |
| 11 | 13 | Brian Ford | |
| 12 | 13 | Brian Ford | |
| 13 | 13 | Brian Ford | OR |
| 14 | 13 | Brian Ford | |
| 15 | 13 | Brian Ford | |
| 16 | 15 | Brian Ford | $ git clone git://github.com/rubyspec/mspec.git |
| 17 | 13 | Brian Ford | |
| 18 | 13 | Brian Ford | |
| 19 | 17 | Brian Ford | If you are going to be working on the RubySpecs, you are _strongly_ encouraged to always use the latest MSpec from Github. |
| 20 | 17 | Brian Ford | |
| 21 | 5 | Brian Ford | h2. Getting the RubySpecs |
| 22 | 12 | Brian Ford | |
| 23 | 13 | Brian Ford | The RubySpec source is available from "Github":http://github.com/rubyspec/rubyspec/tree/master. |
| 24 | 13 | Brian Ford | |
| 25 | 13 | Brian Ford | |
| 26 | 15 | Brian Ford | $ git clone git://github.com/rubyspec/rubyspec.git |
| 27 | 13 | Brian Ford | |
| 28 | 17 | Brian Ford | |
| 29 | 17 | Brian Ford | If you are not working on the RubySpecs, you can checkout a particular version with the following command: |
| 30 | 17 | Brian Ford | |
| 31 | 17 | Brian Ford | |
| 32 | 17 | Brian Ford | $ git checkout -f -b stable v0.7.3 |
| 33 | 17 | Brian Ford | |
| 34 | 17 | Brian Ford | |
| 35 | 18 | Brian Ford | Check the "News":http://rubyspec.org/projects/rubyspec/news page for the most recent stable release. |
| 36 | 13 | Brian Ford | |
| 37 | 11 | Brian Ford | h2. Running the RubySpecs |
| 38 | 1 | ||
| 39 | 13 | Brian Ford | If you cloned MSpec from Github, put the @mspec/bin@ directory in your PATH. The simplest way to run the specs is to change to the RubySpec directory and invoke @mspec@. |
| 40 | 13 | Brian Ford | |
| 41 | 13 | Brian Ford | |
| 42 | 14 | Brian Ford | $ cd rubyspec |
| 43 | 14 | Brian Ford | $ mspec |
| 44 | 13 | Brian Ford | |
| 45 | 13 | Brian Ford | |
| 46 | 13 | Brian Ford | This will run the specs with the @ruby@ executable on PATH. To run the specs with a different implementation, see the @-t@ or |
| 47 | 13 | Brian Ford | |
| 48 | 13 | Brian Ford | To run a single directory of specs, pass the path to the directory to @mspec@. To run a single file, pass the name of the file. |
| 49 | 13 | Brian Ford | |
| 50 | 13 | Brian Ford | |
| 51 | 14 | Brian Ford | $ cd rubyspec |
| 52 | 14 | Brian Ford | $ mspec core/array |
| 53 | 14 | Brian Ford | $ mspec core/array/append_spec.rb |
| 54 | 13 | Brian Ford | |
| 55 | 13 | Brian Ford | |
| 56 | 13 | Brian Ford | The @ruby.1.8.mspec@ and @ruby.1.9.mspec@ config files also provide psuedo-directories that will include all the appropriate files for the version. |
| 57 | 13 | Brian Ford | |
| 58 | 13 | Brian Ford | |
| 59 | 14 | Brian Ford | $ mspec :core |
| 60 | 14 | Brian Ford | $ mspec :library |
| 61 | 14 | Brian Ford | $ mspec :language |
| 62 | 13 | Brian Ford | |
| 63 | 13 | Brian Ford | |
| 64 | 13 | Brian Ford | The psuedo-directory for @:library@ is the most useful since there are both 1.8 and 1.9 specific libraries in the |
| 65 | 13 | Brian Ford | |
| 66 | 16 | Brian Ford | h2. Runner script help |
| 67 | 13 | Brian Ford | |
| 68 | 13 | Brian Ford | To see more help for the particular runner scripts: |
| 69 | 13 | Brian Ford | |
| 70 | 13 | Brian Ford | |
| 71 | 14 | Brian Ford | $ mspec run -h |
| 72 | 14 | Brian Ford | $ mspec ci -h |
| 73 | 14 | Brian Ford | $ mspec tag -h |
| 74 | 13 | Brian Ford |
