Skip to content

Commit

Permalink
Add reference to MockContext in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeSandwich committed Jun 13, 2019
1 parent 00e4fbc commit 4c0e7de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ pub trait Mockable<T, O> {

/// Core function for setting up mocks
///
/// Always consider using [mock_safe](#tymethod.mock_safe) or [MockContext](struct.MockContext.html).
///
/// The passed closure is called whenever the mocked function is called. Depending on variant of returned
/// [MockResult](enum.MockResult.html) the mocked function continues to run or returns immediately.
/// In case of continuation the function arguments can be modified or replaced.
Expand Down Expand Up @@ -130,7 +132,7 @@ impl<T, O, F: FnOnce<T, Output=O>> Mockable<T, O> for F {
/// `MockContext` allows for safe capture of local variables.
///
/// It does this by forcing only mocking the actual function while in the body
/// of [`run`].
/// of [run](#tymethod.run).
///
/// # Examples
///
Expand Down

0 comments on commit 4c0e7de

Please sign in to comment.