<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>spec/public/test/example_groups/views/test/assigns.html.erb</filename>
    </added>
    <added>
      <filename>spec/public/test/example_groups/views/test/multiple_helpers.html.erb</filename>
    </added>
    <added>
      <filename>spec/public/test/example_groups/views/test/one_helper.html.erb</filename>
    </added>
    <added>
      <filename>spec/public/test/example_groups/views/test/simple.html.erb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -27,6 +27,26 @@ module Merb::Test::Rspec::Example
   class ViewExampleGroup &lt; MerbExampleGroup
     include Merb::Test::Rspec::ViewMatchers
 
+    def render(template_path, opts={})
+      klass = Class.new(Merb::Controller)
+      controller = klass.new(FakeRequest.new)
+      assigns.each do |key, value|
+        controller.instance_variable_set(&quot;@#{key.to_s}&quot;, value)
+      end
+      opts[:helpers] ||= [opts[:helper]].compact
+      opts[:helpers].each { |helper| klass.send(:include, helper) }
+      method, location = controller._template_for(nil, nil, nil, :template =&gt; template_path)
+      @_body = controller.send(method)
+    end
+
+    def body; @_body; end
+
+    def assigns; @_assigns ||= Mash.new; end
+
     Spec::Example::ExampleGroupFactory.register(:view, self)
   end
+
+  class Merb::Controller
+    def self.to_s; &quot;ViewExampleController&quot;; end
+  end
 end
\ No newline at end of file</diff>
      <filename>lib/merb-core/test/example_groups/view_example_group.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,7 @@
 require File.join(File.dirname(__FILE__), &quot;..&quot;, &quot;..&quot;, &quot;..&quot;, &quot;spec_helper&quot;)
 
+Merb.start :environment =&gt; 'test', :log_level =&gt; :fatal
+
 describe Spec::Example::ExampleGroupFactory do
   it &quot;should return a ViewExampleGroup when given :type =&gt; :model&quot; do
     example_group = Spec::Example::ExampleGroupFactory.create_example_group(
@@ -7,7 +9,7 @@ describe Spec::Example::ExampleGroupFactory do
     ) {}
     example_group.superclass.should == Merb::Test::Rspec::Example::ViewExampleGroup
   end
-  
+
   it &quot;should return a ViewExampleGroup when given :spec_path =&gt; '/blah/spec/views/'&quot; do
     example_group = Spec::Example::ExampleGroupFactory.create_example_group(
       &quot;name&quot;, :spec_path =&gt; '/blah/spec/views/blah.rb'
@@ -16,8 +18,41 @@ describe Spec::Example::ExampleGroupFactory do
   end
 end
 
+class Merb::Controller
+  self._template_root = File.join(File.dirname(__FILE__), 'views')
+end
+
+module Merb::HelloWorldHelper
+  def hello_world; &quot;Hello World!&quot;; end
+end
+
+module Merb::HelloUniverseHelper
+  def hello_universe; &quot;Hello Universe!&quot;; end
+end
+
 describe &quot;A view spec&quot;, :type =&gt; :view do
   it &quot;should include Merb::Test::Rspec::ViewMatchers&quot; do
     self.class.superclass.should include(Merb::Test::Rspec::ViewMatchers)
   end
+
+  it &quot;should render simple template&quot; do
+    render 'test/simple.html'
+    body.should == &quot;Hello World!&quot;
+  end
+
+  it &quot;should render template with helper&quot; do
+    render 'test/one_helper.html', :helper =&gt; Merb::HelloWorldHelper
+    body.should == &quot;Hello World!&quot;
+  end
+
+  it &quot;should render template with multiple helpers&quot; do
+    render 'test/multiple_helpers.html', :helpers =&gt; [Merb::HelloWorldHelper, Merb::HelloUniverseHelper]
+    body.should == &quot;Hello World!\nHello Universe!&quot;
+  end
+
+  it &quot;should render template with assigned variables&quot; do
+    assigns[:name] = &quot;John&quot;
+    render 'test/assigns.html'
+    body.should == &quot;Hello John!&quot;
+  end
 end</diff>
      <filename>spec/public/test/example_groups/view_spec_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>15abc4e56f1675c04414a5dce902baeee8453cd7</id>
    </parent>
  </parents>
  <author>
    <name>Daniel Siemssen</name>
    <email>daniel.siemssen@gmail.com</email>
  </author>
  <url>http://github.com/wycats/merb-core/commit/cb956ab7bb2de23752b600116e12f5c4cd63dd80</url>
  <id>cb956ab7bb2de23752b600116e12f5c4cd63dd80</id>
  <committed-date>2008-03-25T10:41:55-07:00</committed-date>
  <authored-date>2008-03-04T16:38:16-08:00</authored-date>
  <message>Added render(template_path) feature to view specs.

Signed-off-by: Michael D. Ivey &lt;ivey@gweezlebur.com&gt;</message>
  <tree>3e8a4c60a17aeaff47b75ee966a01a3de19e0a02</tree>
  <committer>
    <name>Michael D. Ivey</name>
    <email>ivey@gweezlebur.com</email>
  </committer>
</commit>
