Skip to content

Commit

Permalink
modified test file and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Coder-Harshit committed Jun 13, 2024
1 parent f7997ff commit 4a0adb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
run: cargo build --release --verbose
- name: Run tests
run: cargo test --verbose
8 changes: 3 additions & 5 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@
mod tests {
use std::process::Command;

use super::*; // Import the functions from the parent module

#[test]
fn test_ospect_runs() {
let result = Command::new("./ospect")
let result = Command::new("target/release/ospect") // Specify the binary path
.output()
.expect("Failed to execute command");
assert!(result.status.success());
}

#[test]
fn test_ospect_all_runs() {
let result = Command::new("./ospect")
let result = Command::new("target/release/ospect") // Specify the binary path
.arg("all")
.output()
.expect("Failed to execute command");
assert!(result.status.success());
}
}
}

0 comments on commit 4a0adb4

Please sign in to comment.