BSD Ports

devel/ruby-mocha 3.1.0 NetBSD

Ruby library for mocking and stubbing

System
NetBSD
Repository
pkgsrc
Maintainer
[email protected]
License
ruby-license OR mit
Categories
devel, ruby
Package size
183.0 KiB, 644.3 KiB installed

Description

Mocha is a Ruby library for mocking and stubbing using a syntax like that of JMock, and SchMock. Most commonly Mocha is used in conjunction with Test::Unit, but it can be used in other contexts.

One of its main advantages is that it allows you to mock and stub methods on real (non-mock) classes and instances. You can for example stub ActiveRecord instance methods like create, save, destroy and even class methods like find to avoid hitting the database in unit tests.

Mocha provides a unified, simple and readable syntax for both traditional mocking and for mocking with real objects.

In the other systems

SystemPortVersion
NetBSDdevel/ruby-mocha3.1.0
OpenBSDdevel/ruby-mocha0.13.3p2

Install

Binary package:

pkgin install ruby33-mocha

From pkgsrc:

cd /usr/pkgsrc/devel/ruby-mocha && make install clean

Dependencies

Run dependencies 2

No port depends on this one.

Configuration

No options to configure.

Service scripts
none
Flavors
ruby34-mocha-3.1.0, ruby40-mocha-3.1.0