spec/lib/backends/redis/basic_spec.rb in picky-3.6.7 vs spec/lib/backends/redis/basic_spec.rb in picky-3.6.8
- old
+ new
@@ -3,57 +3,56 @@
describe Picky::Backends::Redis::Basic do
let(:client) { stub :client }
context 'without options' do
- let(:index) { described_class.new client, :some_namespace }
+ let(:backend) { described_class.new client, :some_namespace }
describe 'load, retrieve, delete' do
it 'is nothing they do (at least on the backend)' do
- index.should_receive(:client).never
+ backend.should_receive(:client).never
- index.load
- index.retrieve
- index.delete
+ backend.load
+ backend.retrieve
end
end
describe 'empty' do
- it 'returns the container that is used for indexing' do
- index.empty.should == {}
+ it 'returns the container that is used for backending' do
+ backend.empty.should == {}
end
end
describe 'initial' do
it 'is correct' do
- index.initial.class.should == described_class
+ backend.initial.should == {}
end
end
describe 'to_s' do
it 'returns the cache path with the default file extension' do
- index.to_s.should == 'Picky::Backends::Redis::Basic(some_namespace:*)'
+ backend.to_s.should == 'Picky::Backends::Redis::Basic(some_namespace:*)'
end
end
end
context 'with options' do
- let(:index) do
+ let(:backend) do
described_class.new client,
:some_namespace,
empty: [],
initial: []
end
describe 'empty' do
- it 'returns the container that is used for indexing' do
- index.empty.should == []
+ it 'returns the container that is used for backending' do
+ backend.empty.should == []
end
end
describe 'initial' do
it 'is correct' do
- index.initial.class.should == Array
+ backend.initial.class.should == Array
end
end
end
end
\ No newline at end of file