Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

Zero choice #70

Merged
merged 2 commits into from
Oct 20, 2016
Merged

Zero choice #70

merged 2 commits into from
Oct 20, 2016

Conversation

sebwas
Copy link
Contributor

@sebwas sebwas commented Oct 19, 2016

Added a possibility to specify a special text for an empty list for example. Also a fix was introduced for if a choice > 2 was used, as that would break the choices.

Now, if three options are specified, it will map the choice as follow:

choice => used index
--------------------
    0  => 0
    1  => 1
    2+ => 2

If only two options are specified, it will use indices:

choice => used index
--------------------
    0  => 1 // Following a '0 cars' thought: 0 cars, 1 car, 2+ cars
    1  => 0
    2+ => 1

I added a test to test for the above mentioned functionality and did not touch the remaining tests to ensure full backwards compatibility.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 91.572% when pulling c2b4297 on sebwas:zero-choice into 328bffc on kazupon:dev.

@kazupon
Copy link
Owner

kazupon commented Oct 20, 2016

Thanks!
That look for good! 👍

@kazupon kazupon merged commit 5f0004f into kazupon:dev Oct 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants