spec/view/view_basics_spec.rb in garterbelt-0.0.7 vs spec/view/view_basics_spec.rb in garterbelt-0.0.8
- old
+ new
@@ -58,21 +58,27 @@
Garterbelt::Tag.new(:type => :p, :content => 'Initalization block content', :view => view)
end
view.block.is_a?(Proc).should be_true
end
- it 'can save the options' do
+ it 'saves the options' do
view = BasicView.new(:foo => 'foo', :bar => 'bar')
view.options.should == {:foo => 'foo', :bar => 'bar'}
end
+ it 'render_style defaults to :pretty' do
+ view = BasicView.new
+ view.render_style.should == :pretty
+ end
+
describe 'setting the curator: view responsible for displaying the rendered content' do
before do
@view.level = 42
@view.output = "foo"
@view.buffer = ["bar"]
@view.escape = false
+ @view.render_style = :text
@child = BasicView.new(:curator => @view)
end
it 'is self by default' do
@view.curator.should == @view
@@ -101,9 +107,13 @@
@child.buffer.should === @view.buffer
end
it 'sets the escape to the curator\'s' do
@child.escape.should == @view.escape
+ end
+
+ it 'sets the render_style to the curator\'s' do
+ @child.render_style.should == @view.render_style
end
end
end
end