A host repository with two recorded files on `dev` and a draft `exp-1` off it, set up before the server starts; then the server, and the host side of the environment talking through it.
()
| 312 | /// off it, set up before the server starts; then the server, and the host |
| 313 | /// side of the environment talking through it. |
| 314 | fn setup() -> (Server, Env, TempDir) { |
| 315 | let local = Env { |
| 316 | home: TempDir::new().unwrap(), |
| 317 | socket: None, |
| 318 | }; |
| 319 | let host = TempDir::new().unwrap(); |
| 320 | ok(local.run(host.path(), &["init"]), "init"); |
| 321 | write(host.path(), "README.md", "hello\n"); |
| 322 | write(host.path(), "src/lib.rs", "pub fn f() {}\n"); |
| 323 | ok( |
| 324 | local.run(host.path(), &["add", "README.md", "src/lib.rs"]), |
| 325 | "add", |
| 326 | ); |
| 327 | ok( |
| 328 | local.run(host.path(), &["record", "-a", "-m", "first"]), |
| 329 | "record", |
| 330 | ); |
| 331 | ok( |
| 332 | local.run(host.path(), &["view", "create", "exp-1", "--from", "dev"]), |
| 333 | "view create", |
| 334 | ); |
| 335 | let server = serve(); |
| 336 | let env = Env { |
| 337 | home: local.home, |
| 338 | socket: Some(server.socket.clone()), |
| 339 | }; |
| 340 | (server, env, host) |
| 341 | } |
| 342 | |
| 343 | fn open(env: &Env, host: &Path, view: &str, dest: &Path) -> Value { |
| 344 | let out = ok( |
no test coverage detected