Simple mocking of Ruby objects


/ Published in: Ruby
Save to your folder(s)

This is as simple as it gets, basiclly this templates shows you how to mock an object methods to any other piece of code that you like (open objects at its simplest glory).


Copy this code and paste it in your HTML
  1. class << to_be_mocked
  2. def mocked_method
  3. # code
  4. end
  5. end

Report this snippet


Comments


You need to login to view comments.