Skip to content

Instantly share code, notes, and snippets.

@marick
Created May 28, 2010 18:56
Show Gist options
  • Save marick/417566 to your computer and use it in GitHub Desktop.
Save marick/417566 to your computer and use it in GitHub Desktop.
def test_creation_of_a_key_file
contact = Contact.contactWithHash(:a_key => Base64.encode64("certificate info"),
:organization => "mom & pop")
collaborators(:folder, :certificate_maker)
hardwired(contact, :certificate_maker)
during {
contact.stash_this_key(:a_key, @folder)
}.behold! {
@certificate_maker.receives(:x509, "certificate info") { "encoded gibberish" }
@folder.receives(:stash, "mom_and_pop.a_key.pem", "encoded gibberish")
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment