Mocks
A utility library providing mock functionality. Intended for testing, but can be used anywhere.
Constants
VERSION = {{ (`shards version \"/tmp/tmp.KNDNCb/src/src\"`).stringify.chomp }}
Class methods
disable
Disables mock functionality. This can be used to disable mock functionality temporarily.
enable
Enables mock functionality. This should be called by the test framework once it is ready.
Macros
fake_value(type)
Returns a fake value of the specified type. This is used to trick the compiler into inferring a specific type. This macro should only be used where strictly needed, and the value should never be used.
Nested types
- Mocks::AbstractArguments
- Mocks::AbstractArgumentsPattern
- Mocks::AbstractCall
- Mocks::Allow(T)
- Mocks::Anything
- Mocks::Arguments(Args, Splat, DoubleSplat)
- Mocks::ArgumentsPattern(Positional, KeywordArguments)
- Mocks::Call(Args)
- Mocks::CallOriginalStub
- Mocks::Count
- Mocks::CountUnion
- Mocks::DSL
- Mocks::DefaultBehavior
- Mocks::Double
- Mocks::ExceptionStub
- Mocks::LazyDouble(Methods)
- Mocks::Mock
- Mocks::MultiValueStub(T)
- Mocks::NilStub
- Mocks::NullObject(T)
- Mocks::ProcStub(T)
- Mocks::Proxy(T)
- Mocks::ReceiveCountExpectation(T)
- Mocks::ReceiveCountExpectationModifiers
- Mocks::ReceiveCountKeyword
- Mocks::ReceiveExpectation(T)
- Mocks::ReceiveExpectationModifiers
- Mocks::Registry
- Mocks::Scope
- Mocks::StandardStubs
- Mocks::Stub
- Mocks::StubCollection(T)
- Mocks::StubModifiers
- Mocks::Stubbable
- Mocks::Stubbed
- Mocks::UnexpectedMessage
- Mocks::ValueStub(T)