The Ruby Toolbox - Know your options!

Category

Mocking

rspec-mocks

38.31
RSpec's 'test double' framework, with support for stubbing and mocking
 Popularity
Downloads
164,039,647
Stars
861
Forks
276
Watchers
46
 Releases
Total releases
105
First release
Latest release

mocha

4.45
Mocking and stubbing library with JMock/SchMock syntax, which allows mocking and stubbing of methods on real (non-mock) classes.
 Popularity
Downloads
17,371,231
Stars
904
Forks
127
Watchers
24
 Releases
Total releases
64
First release
Latest release

mock_redis

0.78
Instantiate one with `redis = MockRedis.new` and treat it like you would a normal Redis object. It supports all the usual Redis operations.
 Popularity
Downloads
2,466,949
Stars
291
Forks
88
Watchers
54
 Releases
Total releases
47
First release
Latest release

rr

0.52
RR is a test double framework that features a rich selection of double techniques and a terse syntax.
 Popularity
Downloads
1,817,940
Stars
244
Forks
20
Watchers
12
 Releases
Total releases
78
First release
Latest release

flexmock

0.16
FlexMock is a extremely simple mock object class compatible with the Minitest framework. Although the FlexMock's interface is simple, it is very flexible.
 Popularity
Downloads
662,054
Stars
10
Forks
5
Watchers
3
 Releases
Total releases
73
First release
Latest release

bogus

0.14
Decreases the need to write integration tests by ensuring that the things you stub or mock actually exist.
 Popularity
Downloads
77,887
Stars
355
Forks
13
Watchers
13
 Releases
Total releases
13
First release
Latest release

jm/stump

0.08
Stubbing and mocking that doesn't hurt or suck. WIN.
 Popularity
Stars
45
Forks
17
Watchers
3

spy

0.05
Spy is a mocking library that was made for the modern age. It supports only 1.9.3+. Spy by default will raise an error if you attempt to stub a method that doesn't exist or call the stubbed method with the wrong arity.
 Popularity
Downloads
103,407
Stars
49
Forks
11
Watchers
3
 Releases
Total releases
14
First release
Latest release

surrogate

0.04
Framework to aid in handrolling mock/spy objects.
 Popularity
Downloads
66,080
Stars
32
Forks
8
Watchers
3
 Releases
Total releases
22
First release
Latest release

facon

0.03
A mocking library in the spirit of the Bacon spec library. Small, compact, and works with Bacon.
 Popularity
Downloads
19,462
Stars
38
Forks
9
Watchers
3
 Releases
Total releases
7
First release
Latest release

verified_double

0.01
Contract tests for rspec
 Popularity
Downloads
23,350
 Releases
Total releases
19
First release
Latest release

cross-stub

0.01
Simple cross process stubbing
 Popularity
Downloads
30,120
Stars
19
Forks
0
Watchers
3
 Releases
Total releases
11
First release
Latest release

mocoso

0.01
A simple stub & mock library.
 Popularity
Downloads
17,050
Stars
16
Forks
2
Watchers
2
 Releases
Total releases
12
First release
Latest release

simple_mock

0.01
A fast, tiny (82 lines) hybrid mocking library that supports classical and partial mocking. Partial mocking mixes classical mocking with real objects. There's no monkey patching `Object` or copying. Mock objects are isolated leaving real objects completely untainted.
 Popularity
Downloads
11,199
Stars
38
Forks
0
Watchers
4
 Releases
Total releases
2
First release
Latest release