Skip to content

0.7.0

Compare
Choose a tag to compare
@lipanski lipanski released this 04 Jul 21:18
· 323 commits to master since this release
  • Introduced the Mock#assert method to assert that a mock was called. You can use Mock#expect to specify the number of requests you're expecting. Check the docs for more details.
  • [Breaking] Mocks will be automatically cleaned up whenever their lifetime ends. This is the more Rusty approach to having to call Mock#remove or reset explicitly. You'll want to assign your mock to a variable in order to establish its lifetime. Check the docs for examples.
  • [Breaking] The Mock#remove method has been removed (or better said, it's private now). You can use std::mem::drop if you really need to remove a mock before its lifetime ends.
  • [Breaking] The Mock#create_for method has been removed. Normal Rust closures { ... } and the lifetimes should replace this just fine.
  • [Breaking] Builder-pattern methods of the Mock struct are now returning Mock instead of &mut Mock.
  • Established clearer boundries between the mock server and the mock client.