rustyroad 1.8.8

Rusty Road is a framework written in Rust that is based on Ruby on Rails. It is designed to provide the familiar conventions and ease of use of Ruby on Rails, while also taking advantage of the performance and efficiency of Rust.
use super::locate::candidates;
use std::path::Path;

#[test]
fn searches_the_secrets_mount_before_project_files_without_duplicates() {
    let paths = candidates();
    let mount = paths
        .iter()
        .position(|path| path == Path::new("/vault/secrets/rustyroad.toml"))
        .expect("the secrets mount should be searched");
    let cwd = std::env::current_dir().unwrap();
    let local = paths
        .iter()
        .position(|path| path.parent() == Some(cwd.as_path()))
        .expect("the working directory should be searched");

    assert!(mount < local);
    for (index, path) in paths.iter().enumerate() {
        assert!(
            !paths[..index].contains(path),
            "{} is listed twice",
            path.display()
        );
    }
}