Skip to content

Commit

Permalink
delete cmd::new:: in new.rs (use-ink#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
honeywest authored Jan 5, 2021
1 parent 4c156d9 commit ea2e388
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cmd/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ where
#[cfg(test)]
mod tests {
use super::*;
use crate::{cmd, util::tests::with_tmp_dir};
use crate::util::tests::with_tmp_dir;

#[test]
fn rejects_hyphenated_name() {
with_tmp_dir(|path| {
let result = cmd::new::execute("rejects-hyphenated-name", Some(path));
let result = execute("rejects-hyphenated-name", Some(path));
assert!(result.is_err(), "Should fail");
assert_eq!(
result.err().unwrap().to_string(),
Expand All @@ -119,7 +119,7 @@ mod tests {
with_tmp_dir(|path| {
let name = "test_contract_cargo_project_already_exists";
let _ = execute(name, Some(path));
let result = cmd::new::execute(name, Some(path));
let result = execute(name, Some(path));

assert!(result.is_err(), "Should fail");
assert_eq!(
Expand All @@ -137,7 +137,7 @@ mod tests {
let dir = path.join(name);
fs::create_dir_all(&dir).unwrap();
fs::File::create(dir.join(".gitignore")).unwrap();
let result = cmd::new::execute(name, Some(path));
let result = execute(name, Some(path));

assert!(result.is_err(), "Should fail");
assert_eq!(
Expand Down

0 comments on commit ea2e388

Please sign in to comment.