Hi, I'm currrently looking at the specs for the ssh_authorized_key provider. There are two tests that give me a headache:
it "should create the directory if it doesn't exist" do File.stubs(:exist?).with(@dir).returns false Dir.expects(:mkdir).with(@dir,0700) @provider.flush end it "should not create or chown the directory if it already exist" do File.stubs(:exist?).with(@dir).returns false Dir.expects(:mkdir).never @provider.flush end Both tests stub exist? to return false (which is obviously wrong in the second case) but both tests are expecting different results. Nevertheless both tests will pass. Am I overlooking something? How can this happen? -Stefan
pgpPfgKzI7x0h.pgp
Description: PGP signature