Skip to content

Releases: lipanski/mockito

0.8.2

26 Jul 19:53
Compare
Choose a tag to compare
  • Fixed a bug where tests wouldn't run without the --test-threads=1 flag any more.

Thanks to @estin

0.8.1

16 Jul 11:03
Compare
Choose a tag to compare
  • Fixed a bug where the status reason phrase was missing from the server response. This was causing problems with mocking requests that went through Hyper.

0.8.0

11 Jul 21:02
Compare
Choose a tag to compare
  • Rewrote part of the internal implementation of Mockito, replacing the client/server approach with a singleton state controlled through a mutex. Long story short, this removed the need for curl and serde as dependencies and significantly improved the response time.

0.7.2

09 Jul 11:01
Compare
Choose a tag to compare
  • The Mock#assert error message now prints out the last unmatched request as well:
    Expected 1 request(s) to:
    
    POST /users
    bob
    
    ...but received 0
    
    The last unmatched request was:
    
    POST /users
    content-length: 5
    alice
    
  • Turned request headers into Vec, instead of HashMap to solve the sorting problem once and for all.
  • Namespaced the internal API with /mockito.

0.7.1

06 Jul 19:54
Compare
Choose a tag to compare
  • Introduced the Mock#match_body method for matching the request body by using the usual Matcher variants.

0.7.0

04 Jul 21:18
Compare
Choose a tag to compare
  • 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.

0.6.0

03 Jun 17:05
Compare
Choose a tag to compare
  • Introduce a new matcher: Match::Regex(String), for matching the request path or headers with a regular expression.
  • Extend the matcher logic to matching the request path (supports all matchers now).
  • Fix a bug in the request processing for large bodies.

Thanks to @estin

0.5.0

22 May 17:32
Compare
Choose a tag to compare
  • Replaced hyper with curl + http-muncher: resulted in a significant speed improvement and support for Windows.

0.4.2

20 May 21:21
Compare
Choose a tag to compare
  • Fix a bug where response headers were unordered & duplicate header field names were not allowed.

Thanks to @alyssais

0.4.1

20 May 12:59
Compare
Choose a tag to compare
  • Run the mock server on 127.0.0.1 (instead of 0.0.0.0).

Thanks to @alyssais