Skip to content

Commit

Permalink
fix(generate): no default name
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleygwilliams committed Apr 15, 2019
1 parent 1f35d96 commit 87ba7e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/command/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub enum Command {
)]
template: String,
/// The name of the project
#[structopt(long = "name", short = "n", default_value = "hello-wasm")]
#[structopt(long = "name", short = "n")]
name: String,
#[structopt(long = "mode", short = "m", default_value = "normal")]
/// Should we install or check the presence of binary tools. [possible values: no-install, normal, force]
Expand Down
8 changes: 1 addition & 7 deletions tests/all/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ use utils;
#[test]
fn generate_with_defaults() {
let fixture = utils::fixture::not_a_crate();
let cmd = fixture.wasm_pack().arg("generate").assert();

let output = cmd.get_output();

assert!(str::from_utf8(&output.stdout)
.unwrap()
.contains("hello-wasm"));
let cmd = fixture.wasm_pack().arg("generate").assert().failure();
}

#[test]
Expand Down

0 comments on commit 87ba7e0

Please sign in to comment.