1. 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)  
      end
    

    EOM

    1 year ago  /  0 notes