From 4c14c7c4c57f20451cd92512f07978e3b1c64885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 3 Jan 2012 22:17:12 +0100 Subject: spec: ENGINE_PROC uses symbols instead of string keys --- spec/node_spec.rb | 12 ++++++------ spec/spec_helper.rb | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/node_spec.rb b/spec/node_spec.rb index f25c45a..06b7fd1 100644 --- a/spec/node_spec.rb +++ b/spec/node_spec.rb @@ -55,9 +55,9 @@ describe Zorglub do h = YAML.load r.body[0] ly = File.join Zorglub::Config.root, Zorglub::Config.layout_dir, Node0.layout vu = File.join Zorglub::Config.root, Zorglub::Config.view_dir, Node0.r, 'index' - h['path'].should == ly - h['layout'].should == ly - h['view'].should == vu + h[:path].should == ly + h[:layout].should == ly + h[:view].should == vu end # # @@ -67,9 +67,9 @@ describe Zorglub do h = YAML.load r.body[0] ly = File.join Zorglub::Config.root, Zorglub::Config.layout_dir, 'main.spec' vu = File.join Zorglub::Config.root, Zorglub::Config.view_dir, Node2.r, 'index.spec' - h['path'].should == ly - h['layout'].should == ly - h['view'].should == vu + h[:path].should == ly + h[:layout].should == ly + h[:view].should == vu end # end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d0356a0..907a84d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -12,7 +12,7 @@ require 'yaml' # require 'zorglub' # -ENGINE_PROC = Proc.new { |path,obj| {'path'=>path,'layout'=>obj.layout,'view'=>obj.view}.to_yaml } +ENGINE_PROC = Proc.new { |path,obj| {:path=>path,:layout=>obj.layout,:view=>obj.view}.to_yaml } Zorglub::Config.register_engine 'default', nil, ENGINE_PROC Zorglub::Config.register_engine 'spec-engine-1', 'spec', ENGINE_PROC Zorglub::Config.register_engine 'spec-engine-2', 'spec', ENGINE_PROC -- cgit v1.1-2-g2b99