069ba2b  

--  
Justin Mazzi


On Friday, October 18, 2013 at 3:07 PM, Fabio Kreusch wrote:

> In spec/model_spec.rb:
> > @@ -66,6 +66,28 @@ module CryptKeeper > record = SensitiveData.create!(storage: 'testing') > SensitiveData.find(record).storage.should == 'testing' > end > + > + it "does not encrypt nil" do > + CryptKeeper::Provider::Encryptor.any_instance.should_not_receive(:encrypt) > + SensitiveData.create!(storage: nil)  
> How about testing the expected result instead?  
> object = SensitiveData.create!(storage: nil) object.reload.storage.should be_nil  
>  
> —
> Reply to this email directly or view it on GitHub (https://github.com/jmazzi/crypt_keeper/pull/57/files#r7071095).
>  
>  
>