Permalink
Browse files

Update deprecated stub! to stub in PageResponseCacheDirectorSpec

  • Loading branch information...
1 parent ff67409 commit 6cf9c95a3d081c1deebfb36b34c09716c560a204 @jomz jomz committed Feb 12, 2014
Showing with 10 additions and 10 deletions.
  1. +10 −10 spec/models/radiant/page_response_cache_director_spec.rb
@@ -25,8 +25,8 @@
let(:non_cacheable_params){ {:private => true, "no-cache" => true} }
let(:cacheable_params){ {:public => true, :private => false} }
let(:listener){ l = OpenStruct.new()
- l.stub!(:set_etag)
- l.stub!(:set_expiry)
+ l.stub(:set_etag)
+ l.stub(:set_expiry)
l
}
let(:page){ OpenStruct.new }
@@ -44,8 +44,8 @@
end
it 'sets the cacheable response to the default timeout' do
- listener.stub!(:cacheable_request?).and_return(true)
- page.stub!(:cache?).and_return(true)
+ listener.stub(:cacheable_request?).and_return(true)
+ page.stub(:cache?).and_return(true)
director = described_class.new(page, listener)
@@ -54,9 +54,9 @@
end
it 'sets the cacheable response to the page timeout' do
- listener.stub!(:cacheable_request?).and_return(true)
- page.stub!(:cache?).and_return(true)
- page.stub!(:cache_timeout).and_return(14.days)
+ listener.stub(:cacheable_request?).and_return(true)
+ page.stub(:cache?).and_return(true)
+ page.stub(:cache_timeout).and_return(14.days)
director = described_class.new(page, listener)
@@ -65,16 +65,16 @@
end
it 'is not cacheable if the listener request is not cacheable' do
- listener.stub!(:cacheable_request?).and_return(false)
+ listener.stub(:cacheable_request?).and_return(false)
director = described_class.new(page, listener)
listener.should_receive(:set_expiry).with(nil, non_cacheable_params)
director.set_cache_control
end
it 'is not cacheable if the page is not cacheable' do
- listener.stub!(:cacheable_request?).and_return(true)
- page.stub!(:cache?).and_return(false)
+ listener.stub(:cacheable_request?).and_return(true)
+ page.stub(:cache?).and_return(false)
director = described_class.new(page, listener)
listener.should_receive(:set_expiry).with(nil, non_cacheable_params)

0 comments on commit 6cf9c95

Please sign in to comment.