Added rspec test for method bellow.