faux

Struct mocking library for Rust (by nrxus)

Faux Alternatives

Similar projects and alternatives to faux

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better faux alternative or higher similarity.

faux reviews and mentions

Posts with mentions or reviews of faux. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-23.
  • Mocking in Rust: Mockall and alternatives
    7 projects | dev.to | 23 May 2023
    Faux allows you to create mock versions of a struct without complicating your code. Like many mocking libraries, faux is only recommended for testing purposes. Mock objects in production may be unstable and cause production problems.
  • Mocking Crates Experience
    1 project | /r/rust | 5 Jan 2023
    I am not a fan of the: "make a trait for every struct so it can be tested" strategy that a lot of mocking libraries or hand rolled mocks do in Rust so I wrote my own library that allows you mock structs directly: https://github.com/nrxus/faux/. Unlike libraries that rely on using traits/dynamic dispatch for mocking this let's your signatures stay as simple as you want them and not incur any runtime cost when doing non-test builds.
  • Mocking trait object without a library
    1 project | /r/rust | 16 Aug 2021
    for a quick shill moment: I did write a mocking library that deliberately does not pollute the original object and tries to be as out of the way as possible: https://github.com/nrxus/faux/. It does work by using macros (don't hate me yet!) but these macros will only be executed when building for test thus not polluting the original objects for production code.
  • faux: a struct mocking library - landing v0.1
    1 project | /r/rust | 19 Apr 2021
    These are the tests for an example: https://github.com/nrxus/faux/blob/master/tests/asynchronous.rs
  • A note from our sponsor - WorkOS
    workos.com | 26 Apr 2024
    The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →

Stats

Basic faux repo stats
4
400
4.3
about 1 month ago

nrxus/faux is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of faux is Rust.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com