Sha256: b56a079907e64b592d489c8e69f91e1d10ad65c87c0219e8ced036e92210f669
Contents?: true
Size: 646 Bytes
Versions: 3
Compression:
Stored size: 646 Bytes
Contents
require_relative '../../spec_helper' describe SearchKeys do let(:backend){ double() } let(:key){ 'key' } let(:command){ SearchKeys.new(backend, key) } let(:keys_found){ ['k1', 'k2', 'k3'] } describe 'result' do before :each do backend.stub(:keys){ keys_found } backend.stub(:get){ 'value' } end it 'should return an array of hashes' do command.result.should be_kind_of(Array) command.result[0].should be_kind_of(Hash) end it 'every entry should have key and value data' do command.result[0][:key].should_not be_nil command.result[0][:value].should_not be_nil end end end
Version data entries
3 entries across 3 versions & 1 rubygems