spec/lib/backend/redis/string_hash_spec.rb in picky-2.6.0 vs spec/lib/backend/redis/string_hash_spec.rb in picky-2.7.0
- old
+ new
@@ -15,11 +15,11 @@
end
end
describe 'collection' do
it 'raises' do
- expect { index.collection :anything }.to raise_error("Can't retrieve a collection from a StringHash. Use Index::Redis::ListHash.")
+ expect { index.collection :anything }.to raise_error("Can't retrieve collection for :anything from a StringHash. Use Index::Redis::ListHash.")
end
end
describe 'member' do
before(:each) do
@@ -33,9 +33,15 @@
end
it 'returns whatever it gets from the backend' do
@backend.should_receive(:hget).any_number_of_times.and_return :some_result
index.member(:anything).should == :some_result
+ end
+ end
+
+ describe 'to_s' do
+ it 'returns the cache path with the default file extension' do
+ index.to_s.should == 'Backend::Redis::StringHash(some_namespace:*)'
end
end
end
\ No newline at end of file