Skip to content

Commit

Permalink
Consistently use tests as the module name for tests (again) (heroku…
Browse files Browse the repository at this point in the history
…#342)

Since we should be consistent, and the idiomatic naming is `tests`:
https://doc.rust-lang.org/book/ch11-03-test-organization.html#unit-tests
https://doc.rust-lang.org/rust-by-example/testing/unit_testing.html

Fixes new instances added since heroku#191.
  • Loading branch information
edmorley authored Feb 23, 2022
1 parent ccacf8a commit f6e3ab0
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/execd/src/bin/dice_roller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn roll_dice(amount: usize, sides: u32) -> u32 {
}

#[cfg(test)]
mod test {
mod tests {
use super::*;

#[test]
Expand Down
2 changes: 1 addition & 1 deletion libcnb-test/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub enum PrepareAppError {
}

#[cfg(test)]
mod test {
mod tests {
use std::collections::HashMap;
use std::path::PathBuf;
use tempfile::tempdir;
Expand Down
2 changes: 1 addition & 1 deletion libcnb-test/src/container_port_mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub(crate) fn port_mapped_container_config(ports: &[u16]) -> bollard::container:
}

#[cfg(test)]
mod test {
mod tests {
use super::*;
use bollard::models::PortMap;

Expand Down
2 changes: 1 addition & 1 deletion libcnb-test/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ right: `{:?}`: {}"#,
}

#[cfg(test)]
mod test {
mod tests {
#[test]
fn simple() {
assert_contains!("Hello World!", "World");
Expand Down
2 changes: 1 addition & 1 deletion libcnb-test/src/pack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl From<PackBuildCommand> for Command {
}

#[cfg(test)]
mod test {
mod tests {
use super::*;
use std::ffi::OsStr;

Expand Down
2 changes: 1 addition & 1 deletion libcnb/src/layer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod handling;
mod public_interface;

#[cfg(test)]
mod test;
mod tests;

pub(crate) use handling::*;
pub use public_interface::*;
File renamed without changes.

0 comments on commit f6e3ab0

Please sign in to comment.