blob: b3cd39f276f10ef7105b2e6ca5cbfe9acebef13c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
require "helper/integration_command_test_case"
class IntegrationCommandTestCustomCommand < IntegrationCommandTestCase
def test_custom_command
mktmpdir do |path|
cmd = "int-test-#{rand}"
file = "#{path}/brew-#{cmd}"
File.open(file, "w") { |f| f.write "#!/bin/sh\necho 'I am #{cmd}'\n" }
FileUtils.chmod 0777, file
assert_match "I am #{cmd}",
cmd(cmd, "PATH" => "#{path}#{File::PATH_SEPARATOR}#{ENV["PATH"]}")
end
end
end
|