-
rSpec — testing protected and private methods
Add the following to the top of your _spec file…
before(:each) do MyClass.send(:public, *MyClass.protected_instance_methods) MyClass.send(:public, *MyClass.private_instance_methods) endEOM
Add the following to the top of your _spec file…
before(:each) do
MyClass.send(:public, *MyClass.protected_instance_methods)
MyClass.send(:public, *MyClass.private_instance_methods)
end
EOM