Skip to content

Commit

Permalink
Added a basic test
Browse files Browse the repository at this point in the history
  • Loading branch information
jdjfisher committed Apr 15, 2023
1 parent 195e237 commit fda4a4d
Show file tree
Hide file tree
Showing 3 changed files with 195 additions and 0 deletions.
176 changes: 176 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ categories = ["command-line-utilities"]
[dependencies]
clap = { version = "4.2.2", features = ["derive"] }
console = "0.15.5"

[dev-dependencies]
assert_cmd = "2.0.11"
predicates = "3.0.3"
15 changes: 15 additions & 0 deletions tests/integration.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use assert_cmd::prelude::*;
use predicates::prelude::*;
use std::process::Command;

#[test]
fn help() {
Command::cargo_bin("git-step")
.unwrap()
.arg("--help")
.assert()
.success()
.stdout(predicate::str::contains(
"Usage: git-step [OPTIONS] <TARGET>",
));
}

0 comments on commit fda4a4d

Please sign in to comment.