Writing tests in your projects is really important, especially because you need to make sure that things that have been implemented are already working as expected, and that future changes do not break something that is already working. In your projects, you may need to test that certain values are being assigned as expected, and sometimes trying to fix failing tests, or when writing new ones can be difficult to decipher the issue. Fortunately, a new Ruby gem has been implemented which is developed making this thing a lot easier.
Developers may feel they do not have that much creativity when it comes to use random words as arguments, or values for many fields. For example, if we have some test cases when we are creating a new instance of a Book object, chances are that we will assign ‘book’ to this object’s title, which does not seem that much interesting. We code because it is something that gives us pleasure, and getting help with these types of difficulties can be helpful. Fortunately, there is a Ruby gem called Faker that generates random fake value that you can use in your tests.
I recently had the pleasure to publish my first article at Scotch.io, which is a very popular platform. It is one of the longest articles that I have written so far. It is a written tutorial on how to build a cryptocurrency site in which you can see the changes of values of BitCoin, Ethereum and NasDaq overtime. The project accompanying this article is developed with Ruby on Rails using Test-Driven Development (TDD).Continue reading
Get a free PDF guide on How to be Super Productive and Get More From Life
I am an experienced and passionate Senior Software Engineer with a demonstrated history of working in the full life cycle of software development with enormous curiosity for data science, machine learning, algorithms, data structures, and solving challenging problems. I am an open-source enthusiast at https://github.com/fatosmorina and also a writer.
I am open for new opportunities.