macro_rules! test_with_ai_config {
($provider:expr, $model:expr, $test:expr) => { ... };
}Expand description
Run a test with specific AI configuration.
This macro creates a test configuration service with the specified AI provider and model, then runs the test closure.
§Examples
ⓘ
use subx_cli::{test_with_ai_config, config::ConfigService};
test_with_ai_config!("anthropic", "claude-3", |config_service: &dyn ConfigService| {
let config = config_service.get_config().unwrap();
assert_eq!(config.ai.provider, "anthropic");
assert_eq!(config.ai.model, "claude-3");
});