spec/view/view_partial_spec.rb in garterbelt-0.0.4 vs spec/view/view_partial_spec.rb in garterbelt-0.0.5
- old
+ new
@@ -52,12 +52,19 @@
partial.curator.should == @view
end
it 'has the correct initalization options' do
@view.partial(PartedOut, :x => '= foo')
- partial = @view
+ partial = @view.buffer.last
+ partial.x.should == '= foo'
end
- it 'passes along the block, wait do views take blocks right now?'
+ it 'passes along the block' do
+ @view.partial(PartedOut, :x => 'not x') do
+ puts { 'maybe x; i don\'t know '}
+ end
+ partial = @view.buffer.last
+ partial.block.is_a?(Proc).should be_true
+ end
end
end
end
\ No newline at end of file