Skip to content

Releases: lipanski/mockito

0.15.0

01 Jan 17:12
Compare
Choose a tag to compare
  • [Breaking] The mock sever will get a dynamically assigned port, though it will try port 1234 first. You will need to change the way you set the server URL - from mockito::SERVER_URL or mockito::SERVER_ADDRESS to mockito::server_url() or mockito::server_address().

Thanks to @kornelski

0.14.1

21 Dec 15:45
Compare
Choose a tag to compare
  • Refactored the server checks - thanks to @kornelski
  • Debug mode: use the log crate instead of the old custom logger - thanks to @kornelski
  • Keep compatibility with older toolchains - thanks to @lucab
  • Introduce clippy - thanks to @macisamuele

0.14.0

18 Nov 14:48
Compare
Choose a tag to compare

~~This is the release candidate for the 1.0.0 🎉 ~~

  • [Breaking] Fully deprecated Matcher::JSON, in favour of Matcher::Json.
  • Replace http-muncher with httparse. This fixed the issues regarding the failing Windows tests. See #51 and #41
  • Updated dependencies.

Thanks to @sterlingjensen, @otavio, @galaxie and @mikrostew

0.13.0

17 Sep 19:21
Compare
Choose a tag to compare
  • Introduced the Matcher::AnyOf variant, which takes a vector of matchers as argument.
  • The Mock::with_body and Mock::with_body_from_file functions now support binary content.
  • Multi-valued headers (e.g. the Via header) are checked over all values. The previous implementation was looking only for the first found header value.
  • Changed the response reason phrase for non-matching requests from 501 Not Implemented to 501 Mock Not Found.
  • Changed the response reason phrase for unparseable requests from 422 Unprocessable Entity to 422 Mock Error.

Thanks to @kornelski

0.12.0

27 Jun 19:53
Compare
Choose a tag to compare
  • Introduced a coloured diff, comparing the expected request with the last unmatched request whenver the Mock::assert() method fails. Closes #23
  • Removed the limitation on the test function name, but also rendered it impossible to create mocks from threads.

0.11.1

24 Jun 16:57
Compare
Choose a tag to compare
  • Introduced Matcher::JsonString which works similarly to the existing Json matcher, except that it takes a String as an argument. This can be useful for test suites which don't expose serde_json methods.
  • Renamed Matcher::JSON to Matcher::Json and introduced a deprecation warning for the old matcher.
  • Added a debug mode to Mockito, which can be enabled by setting the MOCKITO_DEBUG environment variable before running tests.

0.11.0

10 Jun 19:36
Compare
Choose a tag to compare
  • Removed the need for running tests with --test-threads=1. Tests containing mocks will still run sequentially, but this is handled internally now. Tests that don't use mocks can be run in parallel. If you're using mocks inside doctests, please check #36

0.10.0

05 May 18:37
Compare
Choose a tag to compare
  • Bump the serde_json dependency to ^1.0.17, which solves the JSON matcher problems when the preserve_order feature of serde_json is enabled.

Thanks to @Diggsey

0.9.1

10 Mar 11:01
Compare
Choose a tag to compare
  • Fixed compiler warnings because of useless mut.

Thanks to @jean553

0.9.0

29 Aug 17:19
Compare
Choose a tag to compare
  • Introduced the Matcher::JSON variant for matching JSON request bodies.

Thanks to @andir