Unit Testing in Ruby | Cloudbees Blog

In his article on Unit Testing, Martin Fowler mentions that what a unit actually is can change depending on what school of thought you come from. Many from the object-oriented world consider the Class as the unit, whereas those in the functional programming world consider the Function the unit.Even though Ruby is an object-oriented language, I tend to see the method/function as the unit. This is what should be tested, focusing on those methods which comprise the public interface of a particular class. Private methods can be tested through their public interfaces, allowing the actual implementation of them to change and be refactored as needed.
Unit Testing in Ruby | Cloudbees Blog #ruby #rubydeveloper #rubyonrails #blog #cloudbees #testing https://rubyonrails.ba/single/unit-testing-in-ruby-cloudbees-blog

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles