Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use expect_eq rather than expect_that where applicable #110

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/all/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{env, path::Path};

use assert_cmd::Command;
use fs_err as fs;
use googletest::{expect_that, matchers::eq};
use googletest::{expect_eq, verify_eq, verify_that};
use tempfile::TempDir;

#[googletest::test]
Expand Down Expand Up @@ -268,7 +268,7 @@ fn git_patch_version_missmatch() {

let manifest_after = fs::read_to_string(&manifest_path).unwrap();

expect_that!(manifest_before, eq(&manifest_after));
expect_eq!(manifest_before, manifest_after);
}

fn override_redact_crate(
Expand Down
8 changes: 4 additions & 4 deletions tests/all/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use cargo_override::CARGO_TOML;
use assert_cmd::Command;
use fake::{Fake, Faker};
use fs_err as fs;
use googletest::{expect_that, matchers::eq};
use googletest::{expect_eq, verify_eq, verify_that};
use tempfile::TempDir;
use test_case::test_case;

Expand Down Expand Up @@ -692,7 +692,7 @@ fn patch_version_incompatible(dependency_version: &str, patch_version: &str) {

let manifest_after = fs::read_to_string(working_dir_manifest_path).unwrap();

expect_that!(manifest_before, eq(&manifest_after));
expect_eq!(manifest_before, manifest_after);
}

#[test_case(None, None)]
Expand Down Expand Up @@ -735,7 +735,7 @@ fn missing_required_fields_on_patch(name: Option<&str>, version: Option<&str>) {

let manifest_after = fs::read_to_string(working_dir_manifest_path).unwrap();

expect_that!(manifest_before, eq(&manifest_after));
expect_eq!(manifest_before, manifest_after);
}

/// When we add a patch we want to make sure that we're actually depending on the dependency we're
Expand Down Expand Up @@ -783,7 +783,7 @@ fn patch_exists_put_project_does_not_depend_on_it() {

let manifest_after = fs::read_to_string(working_dir_manifest_path).unwrap();

expect_that!(manifest_before, eq(&manifest_after));
expect_eq!(manifest_before, manifest_after);
}

#[googletest::test]
Expand Down
Loading