Add spring cloud --version option

fixes gh-33
This commit is contained in:
Spencer Gibb
2016-10-03 15:12:17 -06:00
parent 44a5adbf6f
commit 33ca198cca
2 changed files with 17 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ import org.junit.Rule;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.startsWith;
import static org.junit.Assert.assertThat;
/**
@@ -41,4 +42,10 @@ public class LauncherCommandTests {
new LauncherCommand().run("--list", "--", "--spring.profiles.active=test");
assertThat(output.toString(), containsString("foo"));
}
@Test
public void testVersion() throws Exception {
new LauncherCommand().run("--version");
assertThat(output.toString(), startsWith("Spring Cloud CLI v"));
}
}