pub struct Log { /* private fields */ }Expand description
The test server’s log (cf dev output: console.log, job and cron
lines, errors), read from the position of Log::mark on.
Jobs and crons log [ocre jobs] <name> done and failures; errors
answered 500 log [ocre] .... Waiting for those lines replaces Rails’
assert_performed_jobs and assert_error_reported: queues deliver
asynchronously, as in production.
§Examples
use ocre::testing::{Client, Log};
let log = Log::mark();
Client::new().post("/signups", &[("email", "ada@example.com")]);
log.wait_for("[ocre jobs] send_welcome done");Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Log
impl RefUnwindSafe for Log
impl Send for Log
impl Sync for Log
impl Unpin for Log
impl UnsafeUnpin for Log
impl UnwindSafe for Log
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more