When I started programming Ruby and I wanted abstract classes I would
raise an exception in the initialize method telling the client that
they were trying to instantiate an abstract class. That was my best
attempt at self-documenting code at the time.
Nowadays, however, when I have behaviou
For example, I have this scenario where a Directory model will only save if
it can connect to the LDAP server. In a test I'm writting, though,
connecting to the LDAP server is not relevant, so I tried doing this:
context "LDAP is on" do
before(:each) do
Directory.stub!(:authent