require 'spec_helper' <% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%> describe "<%= ns_table_name %>/edit" do let(:<%= ns_file_name %>) { build_stubbed :<%= ns_file_name %> } before do assign :<%= ns_file_name %>, <%= ns_file_name %> end it "renders the edit <%= ns_file_name %> form" do render assert_select "form[action=?][method=?]", <%= ns_file_name %>_path(<%= ns_file_name %>), "post" do <% for attribute in output_attributes -%> assert_select "<%= attribute.input_type -%>#<%= ns_file_name %>_<%= attribute.name %>[name=?]", "<%= ns_file_name %>[<%= attribute.name %>]" <% end -%> end end end