HappyNumber exercise with Ruby and testing with Rspec
You have to check if the number passed to the function is a happy number. It means that if you squaring the number digits and add up to each other at the end it has to be equal to one. If you can check it, it is a happy number.
The initial number has to be a positive integer so you have to test it before execute the function.
You can operate the number 25 times maximum.
I am using Rspec to test this exercise.