#!/usr/bin/env bats load test_helper @test "invoke with a host on the network" { run problem-7.sh localhost assert_success "localhost is on the network" } @test "invoke with a host not on the network" { run problem-7.sh unknown assert_success "unknown is NOT on the network" } @test "invoke without a hostname argument" { run problem-7.sh assert_failure "error: a hostname is required" } @test "invoke with multiple hostnames" { run problem-7.sh localhost invalid assert_success $'localhost is on the network\ninvalid is NOT on the network' }