feat: create common test helpers to reduce duplication across test modules
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -1,20 +1,16 @@
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use tempfile::TempDir;
|
||||
use crate::tests::common::test_helpers::{create_temp_dir, test_temp_dir_setup};
|
||||
|
||||
#[test]
|
||||
fn test_list_mode_basic_setup() {
|
||||
// Create a temporary directory for testing
|
||||
let temp_dir = TempDir::new().expect("Failed to create temp directory");
|
||||
|
||||
// Test that we can work with temporary directories
|
||||
assert!(temp_dir.path().exists());
|
||||
test_temp_dir_setup();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_list_mode_directory_operations() {
|
||||
// Create a temporary directory for testing
|
||||
let temp_dir = TempDir::new().expect("Failed to create temp directory");
|
||||
let temp_dir = create_temp_dir();
|
||||
|
||||
// Test reading directory contents (should be empty)
|
||||
let entries: Vec<_> = std::fs::read_dir(temp_dir.path())
|
||||
|
||||
Reference in New Issue
Block a user