diff options
| author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-05 14:08:04 +0100 | 
|---|---|---|
| committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-05 14:08:04 +0100 | 
| commit | 97dcc225201ff9652cf443c42f8abbcfd9ba86c2 (patch) | |
| tree | 79b84047f6c948b206cfbfdb49e8f20e84dc1792 /spec/spec_helper.rb | |
| parent | fd6a806405068758210e0472fc1357a248466ef8 (diff) | |
| download | zorglub-97dcc225201ff9652cf443c42f8abbcfd9ba86c2.zip zorglub-97dcc225201ff9652cf443c42f8abbcfd9ba86c2.tar.gz | |
spec: check class level static definition
Diffstat (limited to 'spec/spec_helper.rb')
| -rw-r--r-- | spec/spec_helper.rb | 42 | 
1 files changed, 23 insertions, 19 deletions
| diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c1e6d64..8d7a9bd 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -45,10 +45,6 @@ class Temp < Zorglub::Node  end  #  class Node0 < Zorglub::Node -    @static_cpt=0 -    class << self -        attr_accessor :static_cpt -    end      # default      def index          html @@ -72,21 +68,6 @@ class Node0 < Zorglub::Node      def do_redirect          redirect r(:do_partial,1,2,3)      end -    attr_reader :value -    def no_static -        static false -        engine 'static' -        view r('do_render') -        Node0.static_cpt+=1 -        @value = Node0.static_cpt -    end -    def do_static -        static true -        engine 'static' -        view r('do_render') -        Node0.static_cpt+=1 -        @value = Node0.static_cpt -    end  end  #  class Node1 < Zorglub::Node @@ -144,12 +125,35 @@ class Node5 < Node4      end  end  # +class Node6 < Zorglub::Node +    @static_cpt=0 +    class << self +        attr_accessor :static_cpt +    end +    attr_reader :value +    static true +    def no_static +        static false +        engine 'static' +        view Node0.r('do_render') +        Node6.static_cpt+=1 +        @value = Node6.static_cpt +    end +    def do_static +        engine 'static' +        view Node0.r('do_render') +        Node6.static_cpt+=1 +        @value = Node6.static_cpt +    end +end +#  APP = Zorglub::App.new do      map '/node0', Node0      map '/node1', Node1      map '/node3', Node3      map '/node4', Node4      map '/node5', Node5 +    map '/node6', Node6  end  class Node2      map APP, '/node2' | 
