Skip to content

Commit

Permalink
Remove redundant cannot_choose_both_dev_and_release test (#862)
Browse files Browse the repository at this point in the history
Fixes #849
Removing a test when it's failing isn't a good idea but
`cannot_choose_both_release_and_dev` test that created from
`cannot_choose_both_release_and_by_name` (in #825) is a duplicate of
`cannot_choose_both_dev_and_release` test.

It could be fixed by adjusting stderr message assertion to 
```sh
Usage: scarb[..] --dev --global-cache-dir <DIRECTORY> --global-config-dir <DIRECTORY> <COMMAND>
```

but that would be the exact same thing as
`cannot_choose_both_dev_and_release`.
  • Loading branch information
szymmis authored Nov 6, 2023
1 parent 4faa510 commit 697865b
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions scarb/tests/profiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,25 +131,6 @@ fn can_choose_release_by_name() {
assert_eq!(all_profiles, vec!["dev".to_string(), "release".to_string()]);
}

#[test]
fn cannot_choose_both_release_and_dev() {
let t = TempDir::new().unwrap();
ProjectBuilder::start().name("hello").build(&t);

Scarb::quick_snapbox()
.args(["--release", "--dev", "metadata", "--format-version", "1"])
.current_dir(&t)
.assert()
.failure()
.stderr_matches(indoc! {r#"
error: the argument '--release' cannot be used with '--dev'
Usage: scarb --release [..] <COMMAND>
For more information, try '--help'.
"#});
}

#[test]
fn can_choose_dev_by_name() {
let t = TempDir::new().unwrap();
Expand Down

0 comments on commit 697865b

Please sign in to comment.