pub fn init_test(dir: &TempDir) -> Result<(), Box<dyn std::error::Error>> {
        let mut cmd = Command::cargo_bin("perseus")?;
        cmd.env("TEST_EXAMPLE", dir.path()) // In dev, the CLI can be made to run anywhere!
            .arg("init")
            .arg("my-app");
        cmd.assert()
            .success()
            .stdout(predicate::str::contains("Your new app has been created!"));

        // Switch to the development version so we're not testing the bleeding-edge CLI
        // with the most recently released version of the core itself (where a
        // lot of bugs will originate)
        let manifest = dir.child("Cargo.toml");
        let contents = std::fs::read_to_string(&manifest).unwrap();
        // The manifest directory is `packages/perseus-cli` within the project
        let path = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
            .parent()
            .unwrap()
            .parent()
            .unwrap()
            .to_string_lossy()
            .to_string();
        let updated_contents = contents
            .replace(
                r#"perseus = { "#,
                &format!(r#"perseus = {{ path = "{}/packages/perseus", "#, &path),
            )
            .replace(
                r#"perseus-axum = { "#,
                &format!(
                    r#"perseus-axum = {{ path = "{}/packages/perseus-axum", "#,
                    &path
                ),
            );
        std::fs::write(manifest, updated_contents).unwrap();

        Ok(())
    }
Initializes a Perseus CLI test by creating a new example app and setting
it to use the bleeding-edge version of the core, so that it tests
correctly.

This uses the `init` command of the CLI under the hood.
packages/perseus-cli/tests/lib.rs