Files
owlen/crates/platform/config/tests/precedence.rs
vikingowl d21945dbc0 chore(git): ignore custom documentation files
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>
2025-11-01 18:49:44 +01:00

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");
}