brew/Library/Homebrew/test/test_integration_cmds_desc.rb

18 lines
623 B
Ruby
Raw Normal View History

require "integration_cmds_tests"
class IntegrationCommandTestDesc < IntegrationCommandTests
def test_desc
setup_test_formula "testball"
assert_equal "testball: Some test", cmd("desc", "testball")
assert_match "Pick one, and only one", cmd_fail("desc", "--search", "--name")
assert_match "You must provide a search term", cmd_fail("desc", "--search")
desc_cache = HOMEBREW_CACHE/"desc_cache.json"
refute_predicate desc_cache, :exist?, "Cached file should not exist"
cmd("desc", "--description", "testball")
assert_predicate desc_cache, :exist?, "Cached file should not exist"
end
end