diff options
| author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-04 02:09:42 +0100 | 
|---|---|---|
| committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-04 02:09:42 +0100 | 
| commit | 2109f1a718094726f61eab595d3b6a8bedcc59e1 (patch) | |
| tree | 6c17074173aa778d1c42a1d83facac3b30b2e61e /spec/node_spec.rb | |
| parent | 18777bb83937837f673f3876c96b7fb8ce59835e (diff) | |
| download | zorglub-2109f1a718094726f61eab595d3b6a8bedcc59e1.zip zorglub-2109f1a718094726f61eab595d3b6a8bedcc59e1.tar.gz | |
spec : add defs spec
Diffstat (limited to 'spec/node_spec.rb')
| -rw-r--r-- | spec/node_spec.rb | 26 | 
1 files changed, 26 insertions, 0 deletions
| diff --git a/spec/node_spec.rb b/spec/node_spec.rb index 9aed852..4b4fbed 100644 --- a/spec/node_spec.rb +++ b/spec/node_spec.rb @@ -126,6 +126,32 @@ describe Zorglub do              r.header['location'].should == Node0.r(:do_partial,1,2,3)          end          # +        it "defs should be inherited" do +            r = Node5.my_call '/index' +            ar = YAML.load r.body[0] +            ar[0].should == 'js0' +            ar[1].should == 'js1' +            ar[2].should == 'js3' +            ar[3].should == 'jsx' +            ar[4].should be_nil +        end +        # +        it "defs should be method scope modified" do +            r = Node4.my_call '/more' +            ar = YAML.load r.body[0] +            ar[0].should == 'js0' +            ar[1].should == 'js1' +            ar[2].should == 'js2' +            ar[3].should be_nil +        end +        # +        it "defs should not have been modified by other method" do +            r = Node4.my_call '/index' +            ar = YAML.load r.body[0] +            ar[0].should == 'js0' +            ar[1].should == 'js1' +            ar[2].should be_nil +        end      end      #  end | 
