← 输入框|github.com|刷新
Skip to content

About

A simple mock object library that I built on stage at Ancient City Ruby.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

AncientMock

A simple mock object library that I built on stage at Ancient City Ruby.

Do not use in production! It was an academic exercise meant to teach the basics of building a mock object library.

Installation

# Gemfile
gem 'ancient_mock'

Usage

warehouse = Object.new

# Stub
allow(warhouse).to receive(:full?).and_return(true)
warehouse.full? # => true

# Mock
item_id = 1234
expect(warehouse).to receive(:remove).with(item_id)
# warehouse.remove(1234) must be called

Tests

bundle exec rake

About

A simple mock object library that I built on stage at Ancient City Ruby.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages