2015-01-15 00:54:43 +00:00
|
|
|
import plugins/fish-spec
|
|
|
|
|
2015-01-17 04:46:44 +00:00
|
|
|
function describe_expect_to_be_true
|
2015-01-15 00:54:43 +00:00
|
|
|
function it_returns_0_when_evaluated_value_returns_0
|
2015-01-21 00:10:39 +00:00
|
|
|
expect true --to-be-true
|
|
|
|
|
|
|
|
expect $status --to-equal 0
|
2015-01-15 00:54:43 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function it_returns_1_when_evaluated_value_returns_1
|
2015-01-21 00:10:39 +00:00
|
|
|
expect false --to-be-true
|
|
|
|
|
|
|
|
expect $status --to-equal 1
|
2015-01-15 00:54:43 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function it_returns_0_when_evaluated_function_returns_0
|
2015-01-21 00:10:39 +00:00
|
|
|
expect "eval true" --to-be-true
|
|
|
|
|
|
|
|
expect $status --to-equal 0
|
2015-01-15 00:54:43 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function it_returns_1_when_evaluated_function_returns_1
|
2015-01-21 00:10:39 +00:00
|
|
|
expect "eval false" --to-be-true
|
|
|
|
|
|
|
|
expect $status --to-equal 1
|
2015-01-15 00:54:43 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
spec.run $argv
|