Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Iron Test
A suite of constructors for Iron Request's and Response's for testing.
Example
API
Request
request::new<S: Str>(method: method::Method, host: S) -> Request
Create a new request at /
on the specified host with the specified method.
Ex:
let req = new;
assert_eq!;
assert_eq!;
request::at(method: method::Method, path: url::Url) -> Request
Create a new request at the specific Url with the specified method.
Ex:
let req = at;
assert_eq!;
assert_eq!;
request::at_with<S: Str>(method: method::Method, path: url::Url, body: S) -> Request
Create a new request at the specified Url with the specified method and the specified content as the body of the request.
Ex:
let req = at_with;
assert_eq!;
assert_eq!;
assert_eq!;
Response
response::new() -> Response
Create a new, blank, response.
Ex:
let mut res = new;
assert_eq!;
assert_eq!;
response::with<B: BytesContainer>(status: status::Status, body: B) -> Response
Create a new response with the specified body and status.
Ex:
let mut res = with;
assert_eq!;
assert_eq!;
Creating project layout for tests
Sometimes it is useful to have a predefined directory layout with specific files in it. You can easily create a simple project directory using a ProjectBuilder.
Ex:
use ProjectBuilder;
To access current project root, use p.root()
.
ProjectBuilder implements Drop and will clean up the project when it is dropped.
Author
Jonathan Reem
Get Help
Come find us on #iron
or #rust
on irc.mozilla.net
License
MIT