@@ -40,6 +40,7 @@ fn bat_raw_command_with_config() -> Command {
4040 cmd.env_remove("BAT_STYLE");
4141 cmd.env_remove("BAT_THEME");
4242 cmd.env_remove("BAT_TABS");
43+ cmd.env_remove("BAT_CONFIG_DIR");
4344 cmd
4445}
4546
@@ -749,21 +750,15 @@ fn config_location_when_generating() {
749750
750751#[test]
751752fn config_location_from_bat_config_dir_variable() {
752− let bat_conf_dir = tempdir().expect("can't create temporary directory.").path().join("bat_conf_dir/");
753−
754− // Create file at BAT_CONFIG_DIR
755753 bat_with_config()
756− .env("BAT_CONFIG_DIR", bat_conf_dir.to_str().unwrap())
757− .arg("--generate-config-file")
754+ .env("BAT_CONFIG_DIR", "conf/")
755+ .arg("--config-file")
758756 .assert()
759757 .success()
760758 .stdout(
761− predicate::str::is_match("Success! Config file written to .*config\n")
759+ predicate::str::is_match("conf/config\n")
762760 .unwrap()
763761 );
764−
765− // Ensure generated config file exists.
766− assert!(bat_conf_dir.join("config").exists());
767762}
768763
769764#[test]