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

Markdown exclude method #1062

Merged
merged 12 commits into from
Oct 6, 2018

Conversation

russellschmidt
Copy link
Contributor

Attempted solution for Issue 1052... I am having a harder time with the test than the changes to random. The modified random method takes a comma-separated list of strings and if they match to a Markdown method, they won't be in the source array that a method is randomly pulled from.

I am no expert yet so what is the best way to test for this? Basically we are trying to prove a negative. The test I threw out there is that we test for a false positive (refute_equal) 20 times. Since there are 10 methods, (1/10)^20 should be pretty hard to achieve if the 'random' method is in fact still calling the excluded method. I am trying to balance the need to get close to zero probability and not be too much of a CPU-hog when running tests. Very open to learning a better way to do this!

Copy link
Member

@vbrazo vbrazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing that I asked before:

  • rebase with master and fix the Rubocop violations
  • add your name + PR to the changelog.md

@vbrazo vbrazo merged commit c5ce80c into faker-ruby:master Oct 6, 2018
davidmorton0 pushed a commit to davidmorton0/faker that referenced this pull request Jul 12, 2021
* corrected typo on dune.md

* lib/faker/markdown.rb

* accept multiple arguments & change to documentation

* fix array length in markdown#random send line

* tests pass

* remove change to dune.md that crept in & is on sep PR 1057

* Minor fix

* Fix merge issues

* Update CHANGELOG.md

* Omit failing test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants