From b9c7f51f7693b741f9dbb9e04cad7da866efd573 Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Wed, 16 Jan 2013 23:04:38 +0100 Subject: add lifetime parameter to #static! --- spec/node_spec.rb | 8 ++++++++ spec/spec_helper.rb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'spec') diff --git a/spec/node_spec.rb b/spec/node_spec.rb index a125d56..654966f 100644 --- a/spec/node_spec.rb +++ b/spec/node_spec.rb @@ -187,6 +187,14 @@ describe Zorglub do r = Node6.my_call '/no_static' r.body[0].should == 'VAL 4' r.header['Content-type'].should == 'text/static' + r = Node6.my_call '/do_static' + r.body[0].should == 'VAL 1' + r.header['Content-type'].should == 'text/static' + Node6.static! true, 0.000001 + sleep 0.0001 + r = Node6.my_call '/do_static' + r.body[0].should == 'VAL 6' + r.header['Content-type'].should == 'text/static' end # it "redirect should work" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 262e966..d678c81 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -152,7 +152,7 @@ class Node6 < Zorglub::Node attr_accessor :static_cpt end attr_reader :value - static! true + static! true, 1 def no_static static! false engine! 'static' -- cgit v1.2.3