2015-01-15 07:56:46 +08:00
|
|
|
import plugins/fish-spec
|
|
|
|
|
2015-01-17 12:46:44 +08:00
|
|
|
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
|
|
|
|
|
2015-01-17 12:46:44 +08:00
|
|
|
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
|
|
|
|
|
2015-01-17 12:46:44 +08:00
|
|
|
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
|