Skip to content

Commit 74c1555

Browse files
committed
BUGFIX: fix broken spec
1 parent 177983a commit 74c1555

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/middleware/anonymous_cache.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ def initialize(env)
1212
@env = env
1313
end
1414

15+
def is_mobile=(val)
16+
@is_mobile = val ? :true : :false
17+
end
18+
1519
def is_mobile?
1620
@is_mobile ||=
1721
begin

spec/components/middleware/anonymous_cache_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def new_helper(env={})
3535
end
3636

3737
it "returns cached data for cached requests" do
38+
helper.is_mobile = true
3839
helper.cached.should be_nil
3940
helper.cache([200, {"HELLO" => "WORLD"}, ["hello ", "world"]])
4041
helper.cached.should == [200, {"HELLO" => "WORLD"}, ["hello world"]]

0 commit comments

Comments
 (0)