Spec behavior of mixing default values with blocks#214
Open
rfdonnelly wants to merge 2 commits intoegonSchiele:masterfrom
rfdonnelly:default_and_block_spec
Open
Spec behavior of mixing default values with blocks#214rfdonnelly wants to merge 2 commits intoegonSchiele:masterfrom rfdonnelly:default_and_block_spec
rfdonnelly wants to merge 2 commits intoegonSchiele:masterfrom
rfdonnelly:default_and_block_spec
Conversation
The specs where default is used fail.
Collaborator
|
@rfdonnelly Thanks for the specs! I will take a look into this soon. |
rfdonnelly
added a commit
to rfdonnelly/jobrnr
that referenced
this pull request
Feb 3, 2016
Tried [contracts.ruby](https://github.com/egonSchiele/contracts.ruby) but does not allow mixing of default values and blocks [contracts.ruby/214](egonSchiele/contracts.ruby#214). Additionally, contracts.ruby gives developer friendly messages but does not give user friendly messages. Instead, rolled by own argument validation. Error messages include expected type, actual value, actual type, and source location. Addresses part of issue #5. Need validation on remaining DSL statements to close.
Contributor
|
@waterlink did this problem ever get fixed? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Default values and blocks don't mix well. The specs added here show this.
I have added specs for both
nil default valuesandnon-nil default valuesbecause they fail differently in theshould fail for lack of block when default usedcase.Output from
bundle exec rake spec: