Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Add a test for trying to run cargo open without a Cargo.toml #9

Open
carols10cents opened this issue Oct 4, 2015 · 0 comments
Open

Comments

@carols10cents
Copy link
Owner

In main.rs, add a unit test for the cargo_dir function that checks that it panics if we try to run this command in a directory that doesn't have a Cargo.toml and thus would have no idea where to look to figure out where that crate might be!

Use the existing test marked should_panic for an example of how to make a test check that a function panics.

I doubt that this test will pass currently! Eventually, I'd like this to panic with a message like "Cannot find Cargo.toml file in the current directory" or similar.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant