bogus icon indicating copy to clipboard operation
bogus copied to clipboard

Implement fake_const(SomeConst)

Open wrozka opened this issue 12 years ago • 0 comments

Let's assume that in the production code there is a constant defined like this:

UserValidator = Validator.new do
  # ...
end

We want to be able to fake this object (copy it's entire interface):

fake(:user_validator, as: :object)

and we want to be able to replace the constant with a fake object that has the same exact interface:

fake_const(UserValidator)

wrozka avatar Oct 23 '13 15:10 wrozka