1 class LayoutsScenario < Scenario::Base
4 create_layout "Main", :content => <<-CONTENT
7 <title><r:title /></title>
15 create_layout "UTF8", :content_type => "text/html;charset=utf8", :content => <<-CONTENT
18 <title><r:title /></title>
28 def create_layout(name, attributes={})
29 create_record :layout, name.symbolize, layout_params(attributes.reverse_merge(:name => name))
32 def layout_params(attributes={})
33 name = attributes[:name] || unique_layout_name
36 :content => "<r:content />"
42 @@unique_layout_name_call_count = 0
43 def unique_layout_name
44 @@unique_layout_name_call_count += 1
45 "Layout #{@@unique_layout_name_call_count}"