Skip to content
Snippets Groups Projects
Commit 36d36b53 authored by Markus Reiter's avatar Markus Reiter
Browse files

Convert `brew command` test to spec.

parent a0dca79f
No related branches found
No related tags found
No related merge requests found
describe "brew command", :integration_test do
it "returns the file for a given command" do
expect { brew "command", "info" }
.to output(%r{#{Regexp.escape(HOMEBREW_LIBRARY_PATH)}/cmd/info.rb}).to_stdout
.and be_a_success
end
it "fails when the given command is unknown" do
expect { brew "command", "does-not-exist" }
.to output(/Unknown command/).to_stderr
.and be_a_failure
end
end
require "testing_env"
class IntegrationCommandTestCommand < IntegrationCommandTestCase
def test_command
assert_equal "#{HOMEBREW_LIBRARY_PATH}/cmd/info.rb",
cmd("command", "info")
assert_match "Unknown command",
cmd_fail("command", "I-don't-exist")
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment