From e0bb27831d05587dc9fa492cc3bf12f752c7c55f Mon Sep 17 00:00:00 2001 From: Bruno Pinto Date: Sat, 10 Jan 2015 15:36:57 -0200 Subject: [PATCH] naiive to_not_include implementation --- plugins/fish-spec/expect.fish | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/fish-spec/expect.fish b/plugins/fish-spec/expect.fish index 45d50a5..1b2df9d 100644 --- a/plugins/fish-spec/expect.fish +++ b/plugins/fish-spec/expect.fish @@ -20,5 +20,15 @@ function expect else emit assertion_failure "Expected \"$list\" to include \"$item\"" end + + case 'to_not_include' + set -l item $actual + set -l list $expected + + if not contains -- "$item" $list + emit assertion_success + else + emit assertion_failure "Expected \"$list\" to not include \"$item\"" + end end end