Add AGENTS.md and CLAUDE.md to .gitignore to exclude project-specific documentation files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
19 lines
549 B
Rust
19 lines
549 B
Rust
use config_agent::{load_settings, Settings};
|
|
use std::{env, fs};
|
|
|
|
#[test]
|
|
fn precedence_env_overrides_files() {
|
|
let tmp = tempfile::tempdir().unwrap();
|
|
let project_file = tmp.path().join(".owlen.toml");
|
|
fs::write(&project_file, r#"model="local-model""#).unwrap();
|
|
|
|
unsafe { env::set_var("OWLEN_MODEL", "env-model"); }
|
|
let s = load_settings(Some(tmp.path().to_str().unwrap())).unwrap();
|
|
assert_eq!(s.model, "env-model");
|
|
}
|
|
|
|
#[test]
|
|
fn default_mode_is_plan() {
|
|
let s = Settings::default();
|
|
assert_eq!(s.mode, "plan");
|
|
} |