Sha256: 77e80c23e169365e5cdaa533e0ab373dca453327d4201d51a0e94b307355f779
Contents?: true
Size: 689 Bytes
Versions: 1
Compression:
Stored size: 689 Bytes
Contents
require 'spec_helper' describe SecretService do describe '.secret' do it 'should delegate to the store' do SecretService::Store.instance.should_receive(:get).with('source secret').and_return('final secret') SecretService.secret('source secret').should == 'final secret' end it 'should cache' do SecretService::Store.instance.should_receive(:get).exactly(:once).and_return('final secret') SecretService.secret('source secret') SecretService.secret('source secret') end it 'should return the source secret if :plain is true' do SecretService.secret('source secret', :plain => true).should == 'source secret' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
secret_service-0.0.1 | spec/shared/secret_service/secret_service_spec.rb |