Sha256: 66af57c88a0f35625f47fe518947eb2a846246beeca96a63f9972e6427553273
Contents?: true
Size: 707 Bytes
Versions: 5
Compression:
Stored size: 707 Bytes
Contents
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
Version data entries
5 entries across 5 versions & 1 rubygems