Skip to content

Commit

Permalink
#160 Add test for module annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
la10736 committed Nov 27, 2022
1 parent a302be0 commit 5ad7e3f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions rstest_macros/src/render/test.rs
Expand Up @@ -1290,6 +1290,20 @@ mod matrix_cases_should {
}
}

#[test]
fn annotate_modules_with_allow_non_snake_name() {
let (_, item_fn, info) = fixture();
let non_snake_case = &attrs("#[allow(non_snake_case)]")[0];

let tokens = matrix(item_fn, info);

let modules = TestsGroup::from(tokens).module.get_modules();

for module in modules {
assert!(module.attrs.contains(&non_snake_case));
}
}

#[test]
fn create_all_tests() {
let (_, item_fn, info) = fixture();
Expand Down

0 comments on commit 5ad7e3f

Please sign in to comment.