Chris Mear wrote in post #990804: > On 4 April 2011 02:00, Matt S. <li...@ruby-forum.com> wrote: >> let(:owner) { mock_model("Owner").as_new_record.as_null_object } >> assert_select "input#asset_name", :name => "asset[name]" # passes >> <%= f.label :name %><br /> >> <div class="actions"> >> <%= f.submit %> >> </div> >> <% end %> > > In similar view specs, I've stubbed #owner_attributes= on the 'assets' > mock. I think Rails' nested form/assignment implementation does a > check on the existence of this method to make sure that the Asset > model does indeed accept nested assignment for that attribute. > > Chris
Thanks Chris, I'll give that a try and post my solution. Matt -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users