struct Index {
    path: Path,
    entries: Vec<Path>,
}

impl Index {
    fn new(path: &str) -> Index {
        return Index { path: Path::new(path.to_string()), entries: vec![] }
    }
}

#[test]
fn new_creates_index_with_passed_path() {
    let path = "my path";
    let index = Index::new(path);

    // Get the index path as a string.
    let index_path = match index.path.as_str() {
        Some(value) => value,
        None => ""
    };

    assert_eq!(index_path, path);
}

#[test]
fn new_creates_index_with_empty_array() {
    let path = "my path";
    let index = Index::new(path);
    let empty_array: Vec<Path> = vec![];

    assert!(index.entries == empty_array)
}

struct Index {
    path: String,
    entries: Vec<String>,
}

impl Index {
    fn new(path: &str) -> Index {
        return Index { path: path.to_string(), entries: vec![] }
    }
}

#[test]
fn new_creates_index_with_passed_path() {
    let path = "my path";
    let index = Index::new(path);
    assert!(index.path == path);
}

#[test]
fn new_creates_index_with_empty_array() {
    let path = "my path";
    let index = Index::new(path);
    let empty_array: Vec<String> = vec![];
    assert!(index.entries == empty_array)
}

--- 
+++ 
@@ -1,11 +1,11 @@
 struct Index {
-    path: Path,
-    entries: Vec<Path>,
+    path: String,
+    entries: Vec<String>,
 }
 
 impl Index {
     fn new(path: &str) -> Index {
-        return Index { path: Path::new(path.to_string()), entries: vec![] }
+        return Index { path: path.to_string(), entries: vec![] }
     }
 }
 
@@ -13,21 +13,13 @@
 fn new_creates_index_with_passed_path() {
     let path = "my path";
     let index = Index::new(path);
-
-    // Get the index path as a string.
-    let index_path = match index.path.as_str() {
-        Some(value) => value,
-        None => ""
-    };
-
-    assert_eq!(index_path, path);
+    assert!(index.path == path);
 }
 
 #[test]
 fn new_creates_index_with_empty_array() {
     let path = "my path";
     let index = Index::new(path);
-    let empty_array: Vec<Path> = vec![];
-
+    let empty_array: Vec<String> = vec![];
     assert!(index.entries == empty_array)
 }
Update Index struct to use Path objects instead of strings.
