[rspec-devel] [ rspec-Bugs-12898 ] render should support :inline
noreply at rubyforge.org
noreply at rubyforge.org
Tue Aug 7 21:24:08 EDT 2007
Bugs item #12898, was opened at 2007-08-07 21:24
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=12898&group_id=797
Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Jay Levitt (jaylev)
Assigned to: Nobody (None)
Summary: render should support :inline
Initial Comment:
The version of render in rspec_on_rails/lib/rails/dsl/behaviour/view.rb supports only rendering a template, a partial, or a file. The ability to render :inline would be useful for such things as testing custom FormBuilders, e.g.:
describe LabelledBuilder do
it "should let me create a text field" do
object = mock(object)
object.stub!(:attribute).and_return("Test String")
render :inline =>
"<% form_for(@object, :builder => LabelledBuilder) do |f| -%>
<%= f.text_field :attribute %>
<% end %>"
response.should have_tag("label")
end
end
results in:
Unhandled render type in view spec.
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=12898&group_id=797
More information about the rspec-devel
mailing list