Skip to content

Commit

Permalink
moving and refactoring cache tests to rails3
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpaniz committed Aug 18, 2010
1 parent 961e894 commit eff76ef
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 5 deletions.
Expand Up @@ -3,7 +3,7 @@
context Restfulie::Client::Cache::Basic do

before do
@response = mock Net::HTTPResponse
@response = Net::HTTPResponse
end

it "should put on the cache if Cache-Control is enabled" do
Expand All @@ -24,7 +24,6 @@
it "should respect the vary header" do
url = Object.new
request = Object.new
@response = mock Net::HTTPResponse
cache = Restfulie::Client::Cache::Basic.new
@response.should_receive(:vary_headers_for).with(request).and_return(1)
@response.should_receive(:vary_headers_for).with(request).and_return(2)
Expand All @@ -38,7 +37,6 @@
it "should not put on the cache if Cache-Control is enabled" do
url = Object.new
request = Object.new
@response = mock Net::HTTPResponse
cache = Restfulie::Client::Cache::Basic.new

Restfulie::Client::Cache::Restrictions.should_receive(:may_cache?).with(@response).and_return(false)
Expand All @@ -50,7 +48,6 @@
it "should remove from cache if expired" do
url = Object.new
request = Object.new
@response = mock Net::HTTPResponse
cache = Restfulie::Client::Cache::Basic.new
@response.should_receive(:vary_headers_for).with(request).and_return(1)
@response.should_receive(:vary_headers_for).with(request).and_return(1)
Expand All @@ -66,7 +63,6 @@
it "should allow cache clean up" do
url = Object.new
request = Object.new
@response = mock Net::HTTPResponse
cache = Restfulie::Client::Cache::Basic.new

Restfulie::Client::Cache::Restrictions.should_receive(:may_cache?).with(@response).and_return(true)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit eff76ef

Please sign in to comment.