Sha256: 7bf8b512a97d771b16cdef14293720a12575853304c7f78b9c2b1169c1177a83
Contents?: true
Size: 752 Bytes
Versions: 12
Compression:
Stored size: 752 Bytes
Contents
require 'rails_helper' <% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%> RSpec.describe "<%= ns_table_name %>/new", <%= type_metatag(:view) %> do before(:each) do assign(:<%= ns_file_name %>, FactoryGirl.build(:<%= ns_file_name %>)) end it "renders new <%= ns_file_name %> form" do render assert_select "form[action=?][method=?]", <%= index_helper %>_path, "post" do <% for attribute in output_attributes -%> <%- name = attribute.respond_to?(:column_name) ? attribute.column_name : attribute.name %> assert_select "<%= attribute.input_type -%>#<%= ns_file_name %>_<%= name %>[name=?]", "<%= ns_file_name %>[<%= name %>]" <% end -%> end end end
Version data entries
12 entries across 12 versions & 3 rubygems