faker icon indicating copy to clipboard operation
faker copied to clipboard

Wanna contribute? Please add the missing tests

Open vbrazo opened this issue 8 years ago • 10 comments

If you're just starting to work with Faker, you should read the contributors file.

After setting up the project in your local machine, you should run the tests to find the missing tests.

Take a look at the screenshoot.

screen shot 2018-05-20 at 8 13 16 pm

The goal should be adding tests for the files that have coverage < 100%.

Do you want to be part of the solution?

vbrazo avatar May 20 '18 23:05 vbrazo

I know that there are 3 warnings that are displayed when you run bundle exec rake or simply rake. These warnings are coming from a dependency/gem. I already wrote an issue about it in their repository, and I'm waiting for a response https://github.com/cldwalker/hirb/issues/103.

vbrazo avatar May 20 '18 23:05 vbrazo

@vbrazo I would love to help! Should I be assigned to this to prevent test duplication?

aamarill avatar May 21 '18 23:05 aamarill

You can go ahead and make your changes. Link your PR in this issue so people will see that you're working on it.

vbrazo avatar May 21 '18 23:05 vbrazo

@vbrazo I am struggling to follow the flow of the tests. Is there any documentation of how the testing works? Or any resources you can point me to? I do apologize for slowing you down and really appreciate any help or insight you can provide 😄

aamarill avatar May 22 '18 01:05 aamarill

@aamarill , take a look at the test folder, such as this one right here.

The tests can be simple. For example, you'll see here they are calling the different methods and asserting that the returned result is a string.

ZASMan avatar May 22 '18 01:05 ZASMan

@ZASMan Thanks for the feedback. 👏

I am trying to play with it a bit (to understand it) by trying to print to the terminal from an arbitrary method (inside one of the test files). But, it seems none of the methods get executed when I run the tests except on the setup method. Hopefully this picture is worth a thousand words 😃

screen shot 2018-05-21 at 7 02 20 pm

edit: better picture.

aamarill avatar May 22 '18 02:05 aamarill

Method names must begin with test_ to be executed.

stympy avatar May 22 '18 02:05 stympy

Thanks @stympy! I just remembered that 😄 I was trying to figure out if they were being run some other way, somehow. Thanks again !!

aamarill avatar May 22 '18 02:05 aamarill

We have 99.92%. I think we're ok and good to go.

screen shot 2018-05-26 at 6 48 13 pm

vbrazo avatar May 26 '18 21:05 vbrazo

Impressive skill @vbrazo I wasn't sure on how to test for the last ones you did! 😮 👍

aamarill avatar May 26 '18 21:05 aamarill