#[cfg(test)]
mod integration_tests {
use std::fs;
use std::path::Path;
#[test]
fn test_complete_game_flow() {
let test_story_content = r#"
[story]
title = "Test Adventure"
start_room = "start"
[rooms.start]
title = "Starting Room"
description = "You are in a starting room."
north = "end"
items = ["key"]
[rooms.end]
title = "End Room"
description = "You have reached the end!"
south = "start"
items = ["treasure"]
[items.key]
name = "Magic Key"
description = "A key that opens doors."
[items.treasure]
name = "Golden Treasure"
description = "A valuable treasure."
"#;
let test_path = "test_story_integration.toml";
fs::write(test_path, test_story_content).expect("Failed to write test story");
assert!(Path::new(test_path).exists());
fs::remove_file(test_path).expect("Failed to clean up test file");
}
#[test]
fn test_cli_commands() {
let _ = std::process::Command::new("cargo")
.args(&["build"])
.output()
.expect("Failed to build project");
assert!(true); }
}