Skip to content

Rust mock type implementing io::Read & io::Write

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

seanmonstar/mock-io

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mock out Rust I/O types

A Rust utility library to help test I/O code. mock-io provides a type implementing Read and Write that can be configured to follow a predefined script and panic otherwise.

Quick start

Add this to your Cargo.toml:

[dev-dependencies]
mock-io = { git = "https://github.com/carllerche/mock-io" }

Next, add this to your tests:

extern crate mock_io;

Now you can use mock-io in your tests.

Tokio integration

mock-io provides Tokio support by default. This can be disabled by ommitting the tokio feature.

License

mock-io is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

See LICENSE-APACHE, and LICENSE-MIT for details.

About

Rust mock type implementing io::Read & io::Write

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%