Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 78 lines (45 sloc) 2.234 kb
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
1 1. Overview
95023aa @brixen Added info to mspec/README.
brixen authored
2
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
3 MSpec is a specialized framework that is syntax-compatible with RSpec for
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
4 basic things like 'describe', 'it' blocks and 'before', 'after' actions. MSpec
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
5 contains additional features that assist in writing the RubySpecs used by
6 multiple Ruby implementations.
7
8 MSpec attempts to use the simplest Ruby language features so that beginning
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
9 Ruby implementations can run the Ruby specs.
95023aa @brixen Added info to mspec/README.
brixen authored
10
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
11 MSpec is not intended as a replacement for RSpec. MSpec attempts to provide a
12 subset of RSpec's features in some cases and a superset in others. It does not
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
13 provide all the matchers, for instance.
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
14
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
15 However, MSpec provides several extensions to facilitate writing the Ruby
16 specs in a manner compatible with multiple Ruby implementations.
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
17
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
18 1. MSpec offers a set of guards to control execution of the specs. These
19 guards not only enable or disable execution but also annotate the specs
20 with additional information about why they are run or not run.
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
21
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
22 2. MSpec provides a different shared spec implementation specifically
23 designed to ease writing specs for the numerous aliased methods in Ruby.
24 The MSpec shared spec implementation should not conflict with RSpec's own
25 shared behavior facility.
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
26
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
27 3. MSpec provides various helper methods to simplify some specs, for
28 example, creating temporary file names.
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
29
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
30 4. MSpec has several specialized runner scripts that includes a
31 configuration facility with a default project file and user-specific
32 overrides.
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
33
34
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
35 2. Bundler
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
36
bd6a7f8 @brixen Updated MSpec source to b437013f.
brixen authored
37 A Gemfile is provided. Use Bundler to install gem dependencies. To install
8ef94dc @brixen Updated MSpec source to b6027016.
brixen authored
38 Bundler, run the following:
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
39
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
40 $ gem install bundler
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
41
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
42 To install the gem dependencies with Bundler, run the following:
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
43
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
44 $ RUBYLIB=lib ruby -S bundle install
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
45
46
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
47 3. Running Specs
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
48
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
49 Use RSpec to run the MSpec specs. There are no plans currently to make the
50 MSpec specs runnable by MSpec.
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
51
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
52 After installing the gem dependencies, the specs can be run as follows:
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
53
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
54 $ ruby -S rspec
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
55
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
56 Or
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
57
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
58 $ ruby -S rake
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
59
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
60 To run an individual spec file, use the following example:
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
61
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
62 $ ruby -S rspec spec/helpers/ruby_exe_spec.rb
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
63
64
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
65 4. Documentation
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
66
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
67 See http://rubyspec.org
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
68
69
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
70 5. Source Code
955b5a6 @brixen Updated MSpec source to 3d0dd0b8.
brixen authored
71
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
72 See https://github.com/rubyspec/mspec
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
73
74
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
75 6. License
bfa449f @brixen Updated MSpec source to f615b16a.
brixen authored
76
29d0256 @brixen Updated MSpec source to 5aff4a48.
brixen authored
77 See the LICENSE in the source code.
Something went wrong with that request. Please try again.