1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/mspec
eregon 548defb608 Update to ruby/mspec@2bd2ead
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-29 00:22:31 +00:00
..
bin
lib Update to ruby/mspec@2bd2ead 2018-12-29 00:22:31 +00:00
spec Update to ruby/mspec@4729971 2018-10-27 10:48:09 +00:00
tool Update to ruby/mspec@2bd2ead 2018-12-29 00:22:31 +00:00
Gemfile
Gemfile.lock Update to ruby/mspec@b5b13de 2018-04-28 19:49:24 +00:00
LICENSE
Rakefile Update to ruby/mspec@072849e 2018-08-03 16:19:10 +00:00
README.md Update to ruby/mspec@b5b13de 2018-04-28 19:49:24 +00:00

Build Status

Overview

MSpec is a specialized framework that is syntax-compatible with RSpec for basic things like 'describe', 'it' blocks and 'before', 'after' actions. MSpec contains additional features that assist in writing the RubySpecs used by multiple Ruby implementations.

MSpec attempts to use the simplest Ruby language features so that beginning Ruby implementations can run the Ruby specs.

MSpec is not intended as a replacement for RSpec. MSpec attempts to provide a subset of RSpec's features in some cases and a superset in others. It does not provide all the matchers, for instance.

However, MSpec provides several extensions to facilitate writing the Ruby specs in a manner compatible with multiple Ruby implementations.

  1. MSpec offers a set of guards to control execution of the specs. These guards not only enable or disable execution but also annotate the specs with additional information about why they are run or not run.

  2. MSpec provides a different shared spec implementation specifically designed to ease writing specs for the numerous aliased methods in Ruby. The MSpec shared spec implementation should not conflict with RSpec's own shared behavior facility.

  3. MSpec provides various helper methods to simplify some specs, for example, creating temporary file names.

  4. MSpec has several specialized runner scripts that includes a configuration facility with a default project file and user-specific overrides.

Requirements

MSpec requires Ruby 2.3 or more recent.

Bundler

A Gemfile is provided. Use Bundler to install gem dependencies. To install Bundler, run the following:

gem install bundler

To install the gem dependencies with Bundler, run the following:

ruby -S bundle install

Running Specs

Use RSpec to run the MSpec specs. There are no plans currently to make the MSpec specs runnable by MSpec.

After installing the gem dependencies, the specs can be run as follows:

ruby -S bundle exec rspec

Or

ruby -S rake

To run an individual spec file, use the following example:

ruby -S bundle exec rspec spec/helpers/ruby_exe_spec.rb

Documentation

See http://ruby.github.io/rubyspec.github.io/

Source Code

See https://github.com/ruby/mspec

License

See the LICENSE in the source code.