Move arg_matches test helper up a level
@@ -662,8 +662,17 @@ mod test {
use hcore;
use hcore::package::PackageTarget;
+ use clap::ArgMatches;
+
use super::*;
+ /// Generate Clap ArgMatches for the exporter from a vector of arguments.
+ fn arg_matches<'a>(args: Vec<&str>) -> ArgMatches<'a> {
+ let app = ::cli();
+ let matches = app.get_matches_from(&args);
+ matches
+ }
+
fn build_spec<'a>() -> BuildSpec<'a> {
BuildSpec {
hab: "hab",
@@ -725,19 +734,11 @@ mod test {
use common::ui::{Coloring, UI};
use hcore;
- use clap::ArgMatches;
use tempdir::TempDir;
use super::super::*;
use super::*;
- /// Generate Clap ArgMatches for the exporter from a vector of arguments.
- fn arg_matches<'a>(args: Vec<&str>) -> ArgMatches<'a> {
- let app = ::cli();
- let matches = app.get_matches_from(&args);
- matches
- }
-
#[test]
fn without_arg_user_and_group_ids_are_the_default_and_identical() {
let matches = arg_matches(vec![&*hcore::PROGRAM_NAME, "testing/foo"]);
