spec/pancake/mixins/render_spec.rb in pancake-0.1.12 vs spec/pancake/mixins/render_spec.rb in pancake-0.1.13
- old
+ new
@@ -51,6 +51,15 @@
it "should render with the rendering controller as the current context" do
@render.render(:context_template)
$captures.first.should be_a_kind_of(Pancake::Mixins::Render::ViewContext)
end
+ it "should yield v when rendering" do
+ mock_v = {}
+ mock_v.should_receive(:in_the_block)
+ @render.should_receive(:v).and_return(mock_v)
+ @render.render(:haml_template) do |v|
+ v.should be_a_kind_of(Hash)
+ v.in_the_block
+ end
+ end
end