spec/keystore_spec.rb in slosilo-0.2.4 vs spec/keystore_spec.rb in slosilo-0.4.0
- old
+ new
@@ -3,11 +3,16 @@
describe Slosilo::Keystore do
include_context "with example key"
include_context "with mock adapter"
describe '#put' do
- it "handles Slosilo::Keys too" do
+ it "handles Slosilo::Keys" do
subject.put(:test, key)
- adapter['test'].should == rsa.to_der
+ adapter['test'].to_der.should == rsa.to_der
+ end
+
+ it "passes the Slosilo key to the adapter" do
+ adapter.should_receive(:put_key).with "test", key
+ subject.put :test, key
end
end
end