2015-01-17 15:10:32 +00:00
|
|
|
import plugins/fish-spec
|
|
|
|
|
|
|
|
function describe_expect_to_not_contain_all
|
|
|
|
function it_is_false_when_lists_are_the_same
|
2015-01-21 00:10:39 +00:00
|
|
|
expect 1 2 --to-not-contain-all 1 2
|
|
|
|
|
|
|
|
expect $status --to-equal 1
|
2015-01-17 15:10:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function it_is_true_when_lists_are_different
|
2015-01-21 00:10:39 +00:00
|
|
|
expect 1 2 --to-not-contain-all 8 9
|
|
|
|
|
|
|
|
expect $status --to-equal 0
|
2015-01-17 15:10:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function it_is_false_when_lists_have_the_same_items_but_in_different_order
|
2015-01-21 00:10:39 +00:00
|
|
|
expect 1 2 --to-not-contain-all 2 1
|
|
|
|
|
|
|
|
expect $status --to-equal 1
|
2015-01-17 15:10:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function it_is_false_when_expected_list_contains_an_item
|
2015-01-21 00:10:39 +00:00
|
|
|
expect 1 2 --to-not-contain-all 1
|
|
|
|
|
|
|
|
expect $status --to-equal 1
|
2015-01-17 15:10:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function it_is_true_when_expected_list_does_not_contain_an_item
|
2015-01-21 00:10:39 +00:00
|
|
|
expect 1 2 --to-not-contain-all 9
|
|
|
|
|
|
|
|
expect $status --to-equal 0
|
2015-01-17 15:10:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function it_is_false_when_expected_list_contains_all_items
|
2015-01-21 00:10:39 +00:00
|
|
|
expect 1 2 3 --to-not-contain-all 1 2
|
|
|
|
|
|
|
|
expect $status --to-equal 1
|
2015-01-17 15:10:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function it_is_true_when_expected_array_does_not_contain_any_items
|
2015-01-21 00:10:39 +00:00
|
|
|
expect 1 2 3 --to-not-contain-all 8 9
|
|
|
|
|
|
|
|
expect $status --to-equal 0
|
2015-01-17 15:10:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function it_is_true_when_expected_array_contains_less_items
|
2015-01-21 00:10:39 +00:00
|
|
|
expect 1 2 --to-not-contain-all 1 2 9
|
|
|
|
|
|
|
|
expect $status --to-equal 0
|
2015-01-17 15:10:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
spec.run $argv
|