oh-my-fish/plugins/fish-spec/spec/expect.to_equal.spec.fish

30 lines
621 B
Fish
Raw Normal View History

2015-01-15 07:56:46 +08:00
import plugins/fish-spec
function describe_expect_to_equal
2015-01-15 07:56:46 +08:00
function it_returns_0_when_compared_values_are_the_same
2015-01-21 08:10:39 +08:00
expect 'equal' --to-equal 'equal'
2015-01-15 07:56:46 +08:00
2015-01-21 08:10:39 +08:00
expect $status --to-equal 0
2015-01-15 07:56:46 +08:00
end
function it_returns_1_when_compared_values_are_different
2015-01-21 08:10:39 +08:00
expect 'equal' --to-equal 'different'
2015-01-15 07:56:46 +08:00
2015-01-21 08:10:39 +08:00
expect $status --to-equal 1
2015-01-15 07:56:46 +08:00
end
function it_returns_0_when_list_items_are_in_the_same_order
2015-01-21 08:10:39 +08:00
expect 1 2 --to-equal 1 2
2015-01-15 07:56:46 +08:00
2015-01-21 08:10:39 +08:00
expect $status --to-equal 0
2015-01-15 07:56:46 +08:00
end
function it_returns_1_when_list_items_are_in_different_order
2015-01-21 08:10:39 +08:00
expect 1 2 --to-equal 2 1
2015-01-15 07:56:46 +08:00
2015-01-21 08:10:39 +08:00
expect $status --to-equal 1
2015-01-15 07:56:46 +08:00
end
end
spec.run $argv