Sha256: 5e9a84f40f13d3c162e622fb956897e690b5537d5aeb62bd7e61bc86beedd085
Contents?: true
Size: 600 Bytes
Versions: 3
Compression:
Stored size: 600 Bytes
Contents
# frozen_string_literal: true RSpec.describe RSpeed::Redis, '#destroy' do let!(:redis) { described_class } before do redis.set('rspeed', '{}') redis.set('rspeed_1', '{}') redis.set('rspeed_2', '{}') end it 'destroys via wildcard' do redis.destroy('rspeed_*') expect(redis.keys('*')).to eq %w[rspeed] end it 'destroys via single name' do redis.destroy('rspeed') expect(redis.keys('*')).to eq %w[rspeed_1 rspeed_2] end it 'destroys default partner when no pattern is given' do redis.destroy expect(redis.keys('*')).to eq %w[rspeed] end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rspeed-0.5.2 | spec/models/rspeed/redis/destroy_spec.rb |
rspeed-0.5.1 | spec/models/rspeed/redis/destroy_spec.rb |
rspeed-0.5.0 | spec/models/rspeed/redis/destroy_spec.rb |