diff --git a/Formula/bcos.rb b/Formula/bcos.rb index 2432dad..2f0acb4 100644 --- a/Formula/bcos.rb +++ b/Formula/bcos.rb @@ -36,17 +36,17 @@ def install test do # Test that bcos command is available - assert_match "BCOS", shell_output("#{bin}/bcos --help 2>&1 || true") + assert_match "BCOS", shell_output("#{bin}/bcos --help 2>&1") # Test version output output = shell_output("#{bin}/clawrtc --version") - assert_match "1.8.0", output + assert_match version.to_s, output # Test BCOS scan on a simple directory mkdir "test_repo" do - write_file "test.py", "# SPDX-License-Identifier: MIT\nprint('hello')" - output = shell_output("#{bin}/bcos scan . 2>&1 || true") + (testpath/"test_repo/test.py").write "# SPDX-License-Identifier: MIT\nprint('hello')" + output = shell_output("#{bin}/bcos scan . 2>&1") assert_match "Trust Score", output end end -end \ No newline at end of file +end