I want to write a spec for a custom form builder, but I'm not really sure where it should live or how to include the right rspec_on_rails contexts. Ideally, I should be able to write a spec like:
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 but I'm not having much luck. Can anyone give me an idea where to start? Jay _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users