Skip to content

Commit

Permalink
Don't pin fake and quickcheck to older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeMathWalker committed Aug 29, 2024
1 parent 9130cc3 commit 8dec61a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 91 deletions.
120 changes: 34 additions & 86 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ tracing-actix-web = "0.7"
secrecy = { version = "0.8", features = ["serde"] }

[dev-dependencies]
quickcheck = "0.9.2"
quickcheck_macros = "0.9.1"
fake = "~2.3.0"
quickcheck = "1.0.3"
quickcheck_macros = "1"
fake = "2.9"
wiremock = "0.6"
serde_json = "1.0.61"
linkify = "0.10"
Expand Down
8 changes: 6 additions & 2 deletions src/domain/subscriber_email.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ mod tests {
use claims::assert_err;
use fake::faker::internet::en::SafeEmail;
use fake::Fake;
use rand::rngs::StdRng;
use rand::SeedableRng;

#[test]
fn empty_string_is_rejected() {
Expand All @@ -54,8 +56,10 @@ mod tests {
struct ValidEmailFixture(pub String);

impl quickcheck::Arbitrary for ValidEmailFixture {
fn arbitrary<G: quickcheck::Gen>(g: &mut G) -> Self {
let email = SafeEmail().fake_with_rng(g);
fn arbitrary(g: &mut quickcheck::Gen) -> Self {
let mut rng = StdRng::seed_from_u64(u64::arbitrary(g));
let email = SafeEmail().fake_with_rng(&mut rng);

Self(email)
}
}
Expand Down

0 comments on commit 8dec61a

Please sign in to comment.