GithubHelp home page GithubHelp logo

isabella232 / mspec Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ruby/mspec

0.0 0.0 0.0 1.37 MB

RSpec-like test runner for the Ruby Spec Suite

Home Page: https://github.com/ruby/spec

License: MIT License

Ruby 99.87% Batchfile 0.02% Shell 0.11%

mspec's Introduction

Overview

MSpec is a specialized framework that is syntax-compatible with RSpec 2 for basic things like describe, it blocks and before, after actions. MSpec contains additional features that assist in writing specs for Ruby implementations in ruby/spec.

MSpec attempts to use the simplest Ruby language features so that beginning Ruby implementations can run the Ruby specs. For example, no file from the standard library or RubyGems is necessary to run MSpec.

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.

  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.

  5. MSpec support "tagging", that is excluding specs known as failing on a particular Ruby implementation, and automatically adding and removing tags while running the specs.

Requirements

MSpec requires Ruby 2.5 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: ruby#19.

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

ruby -S bundle exec rspec

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

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

Documentation

See CONTRIBUTING.md in ruby/spec for a list of matchers and how to use mspec.

Source Code

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

License

See the LICENSE in the source code.

mspec's People

Contributors

eregon avatar brixen avatar nobu avatar arthurschreiber avatar jredville avatar elia avatar febuiles avatar jfirebaugh avatar andrykonchin avatar marcandre avatar chrisseaton avatar jc00ke avatar yugui avatar nurse avatar nirvdrum avatar ksss avatar runpaint avatar nicksieger avatar luislavena avatar alloy avatar mernen avatar rue avatar kachick avatar hsbt avatar timfel avatar rdp avatar ryoqun avatar bjfish avatar btakita avatar iainbeeston avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.