Avoid test delays and speed up your development cycle by mocking callbacks

Mocking is one way to achieve isolation in tests. It is the practice of using a fake object in place of a collaborator object. In the simplest case, a mock will accept a method call, do nothing, and return a value (usually nil in Ruby). Mocks can also stub methods to return realistic values. They can provide static responses or use arguments to calculate a return value. It’s often as simple as specifying the expected method arguments and a response.
Avoid test delays and speed up your development cycle by mocking callbacks #ruby #rubydeveloper #rubyonrails #callbacks #development #test https://rubyonrails.ba/single/avoid-test-delays-and-speed-up-your-development-cycle-by-mocking-callbacks

Nezir Zahirovic

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

related articles