Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants