summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-01-16 23:04:38 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2013-01-16 23:04:38 +0100
commitb9c7f51f7693b741f9dbb9e04cad7da866efd573 (patch)
tree8a99fe9b5f689847c5175bfa731b2d4be8e82602 /spec
parentd5d9d43709aa5eb9d880effa127bccee2cae98db (diff)
downloadzorglub-b9c7f51f7693b741f9dbb9e04cad7da866efd573.zip
zorglub-b9c7f51f7693b741f9dbb9e04cad7da866efd573.tar.gz
add lifetime parameter to #static!
Diffstat (limited to 'spec')
-rw-r--r--spec/node_spec.rb8
-rw-r--r--spec/spec_helper.rb2
2 files changed, 9 insertions, 1 deletions
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'