Skip to content

Instantly share code, notes, and snippets.

@scode
Created September 12, 2014 05:53
Show Gist options
  • Select an option

  • Save scode/a29ce01e7dc34b81496d to your computer and use it in GitHub Desktop.

Select an option

Save scode/a29ce01e7dc34b81496d to your computer and use it in GitHub Desktop.
#[test]
fn test_from_file() {
let tmp_dir = io::TempDir::new("jsontest").unwrap();
let tmp_file: io::File = io::File::create(tmp_dir.path()).unwrap();
let tmp_path: Path = *tmp_file.path();
let mut tmp_out = io::BufferedWriter::new(tmp_file);
tmp_out.write_str(valid_cfg_json());
tmp_out.flush();
super::from_file(&tmp_path);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment