Created
August 7, 2008 15:50
-
-
Save george/4430 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%- content_for :main_content do -%> | |
<div id="main_content"> | |
<%= render :partial => 'form' %> | |
</div> <!-- main_content --> | |
<%- end -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "should render edit form" do | |
# where should this go? | |
template.expect_render(:partial => 'form', :object => @faq) | |
render "/faqs/edit.html.erb" | |
response[:main_content].should have_tag("form[action=#{faq_path(@faq)}][method=post]") do | |
with_tag('input#faq_question[name=?]', "faq[question]") | |
with_tag('textarea#faq_answer[name=?]', "faq[answer]") | |
with_tag('input#faq_position[name=?]', "faq[position]") | |
with_tag('input#faq_published[name=?]', "faq[published]") | |
with_tag('input#faq_submitted_by_name[name=?]', "faq[submitted_by_name]") | |
with_tag('input#faq_submitted_by_email[name=?]', "faq[submitted_by_email]") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment