aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cask/cli
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test/cask/cli')
-rw-r--r--Library/Homebrew/test/cask/cli/--version_spec.rb13
-rw-r--r--Library/Homebrew/test/cask/cli/version_spec.rb9
2 files changed, 13 insertions, 9 deletions
diff --git a/Library/Homebrew/test/cask/cli/--version_spec.rb b/Library/Homebrew/test/cask/cli/--version_spec.rb
new file mode 100644
index 000000000..2e5737c9f
--- /dev/null
+++ b/Library/Homebrew/test/cask/cli/--version_spec.rb
@@ -0,0 +1,13 @@
+describe Hbc::CLI::Version, :cask do
+ describe "::run" do
+ it "outputs the current Hombrew-Cask version" do
+ expect { described_class.run }
+ .to output(/\AHomebrew-Cask.*\d+\.\d+\.\d+/).to_stdout
+ .and not_to_output.to_stderr
+ end
+
+ it "does not support arguments" do
+ expect { described_class.run(:foo, :bar) }.to raise_error(ArgumentError)
+ end
+ end
+end
diff --git a/Library/Homebrew/test/cask/cli/version_spec.rb b/Library/Homebrew/test/cask/cli/version_spec.rb
deleted file mode 100644
index 2091496fc..000000000
--- a/Library/Homebrew/test/cask/cli/version_spec.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-describe "brew cask --version", :cask do
- it "respects the --version argument" do
- expect {
- expect {
- Hbc::CLI::NullCommand.new("--version").run
- }.not_to output.to_stderr
- }.to output(Hbc.full_version).to_stdout
- end
-end