diff --git a/Cargo.toml b/Cargo.toml index 5420789..c5f71e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,12 +35,12 @@ isahc = { version = "1.7", optional = true } basic-cookies = { version = "0.1", optional = true } colored = { version = "2.0", optional = true } clap = { version = "4.4", features = ["derive", "env"], optional = true } -env_logger = { version = "0.10", optional = true } +env_logger = { version = "0.11.1", optional = true } serde_yaml = { version = "0.9", optional = true } async-std = { version = "1.12", features = ["attributes", "unstable"] } [dev-dependencies] -env_logger = "0.10" +env_logger = "0.11.1" tokio-test = "0.4" quote = "1.0" actix-rt = "2.9" diff --git a/README.md b/README.md index 66d93a2..42da9b1 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ to path `/translate` with query parameter `word=hello`. The corresponding HTTP r In case the request fails, `httpmock` would show you a detailed error description including a diff between the expected and the actual HTTP request: -![colored-diff.png](docs/diff.png) +![colored-diff.png](https://raw.githubusercontent.com/alexliesenfeld/httpmock/master/docs/diff.png) # Usage diff --git a/src/lib.rs b/src/lib.rs index 6a92ef7..c239b67 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,6 +46,12 @@ //! // Ensure the mock server did respond as specified. //! assert_eq!(response.status(), 200); //! ``` +//! +//! In case the request fails, `httpmock` would show you a detailed error description including a diff between the +//! expected and the actual HTTP request: +//! +//! ![colored-diff.png](https://raw.githubusercontent.com/alexliesenfeld/httpmock/master/docs/diff.png) +//! //! # Usage //! To be able to configure mocks, you first need to start a mock server by calling //! [MockServer::start](struct.MockServer.html#method.start). diff --git a/tests/examples/getting_started_tests.rs b/tests/examples/getting_started_tests.rs index 7e8566c..ddc7fdd 100644 --- a/tests/examples/getting_started_tests.rs +++ b/tests/examples/getting_started_tests.rs @@ -42,7 +42,7 @@ async fn async_getting_started_test() { .await; // Send an HTTP request to the mock server. This simulates your code. - let url = format!("http://{}/hello-rustaceans", server.address()); + let url = format!("http://{}/hello", server.address()); let response = get_async(&url).await.unwrap(); // Ensure the specified mock responded exactly one time.