diff options
| author | Markus Reiter | 2017-02-23 06:02:51 +0100 |
|---|---|---|
| committer | Markus Reiter | 2017-02-23 21:25:24 +0100 |
| commit | dc417042d50fca1305317375a58f4942cde73f6e (patch) | |
| tree | b2da7410a804c057b96d97cee679b4d53ed26a5d /Library/Homebrew/test/cmd | |
| parent | c7121f6be50e44784e3e29114617c29715bd9c0f (diff) | |
| download | brew-dc417042d50fca1305317375a58f4942cde73f6e.tar.bz2 | |
Convert `brew custom-external-command` test to spec.
Diffstat (limited to 'Library/Homebrew/test/cmd')
| -rw-r--r-- | Library/Homebrew/test/cmd/custom-external-command_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Library/Homebrew/test/cmd/custom-external-command_spec.rb b/Library/Homebrew/test/cmd/custom-external-command_spec.rb new file mode 100644 index 000000000..8ccc21fa7 --- /dev/null +++ b/Library/Homebrew/test/cmd/custom-external-command_spec.rb @@ -0,0 +1,21 @@ +describe "brew custom-external-command", :integration_test do + it "is supported" do + Dir.mktmpdir do |path| + path = Pathname.new(path) + + cmd = "custom-external-command-#{rand}" + file = path/"brew-#{cmd}" + + file.write <<-EOS.undent + #!/bin/sh + echo 'I am #{cmd}.' + EOS + FileUtils.chmod "+x", file + + expect { brew cmd, "PATH" => "#{path}#{File::PATH_SEPARATOR}#{ENV["PATH"]}" } + .to output("I am #{cmd}.\n").to_stdout + .and not_to_output.to_stderr + .and be_a_success + end + end +end |
