Sha256: 38e4b364f3f6d409208e039ece0cc1f888c671f8d95596e83836d108108aeca0
Contents?: true
Size: 590 Bytes
Versions: 6
Compression:
Stored size: 590 Bytes
Contents
require 'spec_helper' describe SecretService do describe '.secret' do let(:store) { double('store') } before do SecretService::Store.stub :new => store end it 'should delegate to the store' do store.should_receive(:get).with('source secret').and_return('final secret') SecretService.secret('source secret').should == 'final secret' end it 'should cache' do store.should_receive(:get).exactly(:once).and_return('final secret') SecretService.secret('source secret') SecretService.secret('source secret') end end end
Version data entries
6 entries across 6 versions & 1 rubygems