test/test_cache.rb in rest-graph-1.8.0 vs test/test_cache.rb in rest-graph-1.9.0
- old
+ new
@@ -19,15 +19,16 @@
stub_request(:get, @url).to_return(:body => @body).times(1)
end
should 'enable cache if passing cache' do
3.times{ @rg.get('cache').should == @body }
- @cache.should == {@rg.send(:cache_key, @url) => @body}
+ @cache.should == {@rg.send(:cache_key, {}, @url) => @body}
end
should 'respect expires_in' do
mock(@cache).method(:store){ mock!.arity{ -3 } }
- mock(@cache).store(@rg.send(:cache_key, @url), @body, :expires_in => 3)
+ mock(@cache).store(@rg.send(:cache_key, {}, @url), @body,
+ :expires_in => 3)
@rg.get('cache', {}, :expires_in => 3).should == @body
end
should 'update cache if there is cache option set to false' do
@rg.get('cache') .should == @body