Registry / testing / rspec-mocks

rspec-mocks

JSON →
library3.13.8rbrubygemsunverified

RSpec's 'test double' framework, with support for stubbing and mocking.

gem install rspec-mocks
INSTALL
IMPORT
SIG · RSPEC-MOCKS
R
rspec-mocks
testingrubyv3.13.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RSpec::Mocks
require 'rspec/mocks'

Create a test double with stubbed methods.

require 'rspec/mocks' include RSpec::Mocks::ExampleMethods user = double('user', name: 'Alice') allow(user).to receive(:age).and_return(30) puts user.name
Debug
Known issues

No known issues recorded.

Upgrade
Version history
3.13.8latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
rspec-mocks — gem install rspec-mocks · libregistry