fix most deprecations in the specs (still some left)

This commit is contained in:
Régis Hanol
2014-09-25 17:44:48 +02:00
parent dd5872eecb
commit de76b512c1
121 changed files with 859 additions and 856 deletions

View File

@ -13,15 +13,15 @@ describe Middleware::AnonymousCache::Helper do
context "cachable?" do
it "true by default" do
new_helper.cacheable?.should be_true
new_helper.cacheable?.should == true
end
it "is false for non GET" do
new_helper("ANON_CACHE_DURATION" => 10, "REQUEST_METHOD" => "POST").cacheable?.should be_false
new_helper("ANON_CACHE_DURATION" => 10, "REQUEST_METHOD" => "POST").cacheable?.should == false
end
it "is false if it has an auth cookie" do
new_helper("HTTP_COOKIE" => "jack=1; _t=#{"1"*32}; jill=2").cacheable?.should be_false
new_helper("HTTP_COOKIE" => "jack=1; _t=#{"1"*32}; jill=2").cacheable?.should == false
end
end
@ -41,14 +41,14 @@ describe Middleware::AnonymousCache::Helper do
it "returns cached data for cached requests" do
helper.is_mobile = true
helper.cached.should be_nil
helper.cached.should == nil
helper.cache([200, {"HELLO" => "WORLD"}, ["hello ", "my world"]])
helper = new_helper("ANON_CACHE_DURATION" => 10)
helper.is_mobile = true
helper.cached.should == [200, {"HELLO" => "WORLD"}, ["hello my world"]]
crawler.cached.should be_nil
crawler.cached.should == nil
crawler.cache([200, {"HELLO" => "WORLD"}, ["hello ", "world"]])
crawler.cached.should == [200, {"HELLO" => "WORLD"}, ["hello world"]]
end