Hi! I am writing controller specs and getting a weird expectation failure. Here is the example. Please read the comments for details:
it 'renders children/_show partial' do post :create, :child => @child # The line "response.should render_template('children/_show')" gives # me error: # ChildrenController when the enrollment form data is valid renders # children/_show partial' FAILED # expected "children/_show", got "children/_show_print_layout.html.erb" response.should render_template('children/_show') # This is weird. _show partial contains a button 'Print Form' and next #assertion passes, but the one above fails. response.should have_selector( 'input', :type => 'submit', :value => 'Print Form' ) response.should be_success end Many Thanks! -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users