Fix failing tests for progress_bar changes
This commit is contained in:
@@ -5,16 +5,16 @@ defmodule ProgressBarTest do
|
|||||||
|
|
||||||
test "empty bar" do
|
test "empty bar" do
|
||||||
bar = ProgressBar.progress_bar(%{total: 12, current: 0})
|
bar = ProgressBar.progress_bar(%{total: 12, current: 0})
|
||||||
assert bar == "| | 0 of 12"
|
assert bar == "| | 0 of 12 -> 0.0% complete"
|
||||||
end
|
end
|
||||||
|
|
||||||
test "puts counter on the right until half the koans are complete" do
|
test "puts counter on the right until half the koans are complete" do
|
||||||
bar = ProgressBar.progress_bar(%{total: 12, current: 3})
|
bar = ProgressBar.progress_bar(%{total: 12, current: 3})
|
||||||
assert bar == "|=======> | 3 of 12"
|
assert bar == "|=======> | 3 of 12 -> 25.0% complete"
|
||||||
end
|
end
|
||||||
|
|
||||||
test "full bar" do
|
test "full bar" do
|
||||||
bar = ProgressBar.progress_bar(%{total: 12, current: 12})
|
bar = ProgressBar.progress_bar(%{total: 12, current: 12})
|
||||||
assert bar == "|=============================>| 12 of 12"
|
assert bar == "|=============================>| 12 of 12 -> 100.0% complete"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user