spec/tc_element.rb in ramaze-0.0.7 vs spec/tc_element.rb in ramaze-0.0.8

- old
+ new

@@ -1,13 +1,13 @@ # Copyright (c) 2006 Michael Fellinger m.fellinger@gmail.com # All files in this distribution are subject to the terms of the Ruby license. require 'spec/spec_helper' -include Ramaze +class TCElementController < Ramaze::Controller + trait :engine => Ramaze::Template::Ezamar -class TCElementController < Template::Ramaze def index "The index" end def elementy @@ -35,34 +35,35 @@ def templating(times) %{<PageWithTemplating times="#{times}" />} end end -class Page < Element +class Page < Ezamar::Element def render %{ <wrap> #{content} </wrap> } end end -class PageWithParams < Element + +class PageWithParams < Ezamar::Element def render @hash.inspect end end -class PageLittle < Element +class PageLittle < Ezamar::Element def render "little" end end -class PageLittleWithParams < Element +class PageLittleWithParams < Ezamar::Element def render @hash.inspect end end -class PageWithTemplating < Element +class PageWithTemplating < Ezamar::Element def render (1..@hash['times']).to_a.join(', ') end end