#!/usr/bin/env bats load test_helper @test 'assert_not_equal() : returns 0 if does not equal ' { run assert_not_equal foo bar assert_test_pass run assert_not_equal "foo" "bar" assert_test_pass run assert_not_equal "foo" "" assert_test_pass run assert_not_equal "" "foo" assert_test_pass } @test 'assert_not_equal() : returns 1 and displays details if equals ' { run assert_not_equal 'foobar' 'foobar' assert_test_fail <<'ERR_MSG' -- values should not be equal -- unexpected : foobar actual : foobar -- ERR_MSG run assert_not_equal 1 1 assert_test_fail <<'ERR_MSG' -- values should not be equal -- unexpected : 1 actual : 1 -- ERR_MSG } @test 'assert_not_equal() : displays details in multi-line format if and are longer than one line' { run assert_not_equal $'foo\nbar' $'foo\nbar' assert_test_fail <<'ERR_MSG' -- values should not be equal -- unexpected (2 lines): foo bar actual (2 lines): foo bar -- ERR_MSG } @test 'assert_not_equal() : performs literal matching' { run assert_not_equal 'a' '*' assert_test_pass }