galvanic-mock icon indicating copy to clipboard operation
galvanic-mock copied to clipboard

A mocking framework for Rust

Results 6 galvanic-mock issues
Sort by recently updated
recently updated
newest added

The `#[use_mocks]` macro panics when faced with use statements that use Rust 2018 uniform paths. For example, this code: ```rust #![feature(proc_macro_hygiene)] struct Foo(); #[cfg(test)] mod tests { use galvanic_mock::*; #[use_mocks]...

Hi, After trying a few things I seem to be at a loss on how to mock the Read trait for the arguments. ``` pub trait GetToken { fn tokenize(&mut...

I am not sure how to interpret the error for the following code: ``` extern crate galvanic_mock; use galvanic_mock::{mockable, use_mocks}; use std::io::Result; // First declare the trait to be mockable...

It seems that galvanic-mock can mock a method with generic parameters, but only if the match and return expressions are written purely in terms of the generic types. That's not...

Galvanic Mock cannot be used to mock a trait object that must be Send. Example: ```rust fn send() { let mock = new_mock!(SendTrait); given! { ::foo() then_return () always; }...

galvanic-mock's own tests pass using rustc 1.26.0-nightly (28a1e4ffe 2018-02-24), but fail using rustc 1.27.0-nightly (e5f80f2a4 2018-05-09). ``` > cargo +nightly test Compiling galvanic-mock v0.1.3 (file:///usr/home/somers/src/rust/galvanic-mock) error[E0658]: custom attributes cannot be...