Sha256: 4840264a9374bf6c475589d526dccc375124fc5397610b24ad76a9b85a45ffe4
Contents?: true
Size: 947 Bytes
Versions: 12
Compression:
Stored size: 947 Bytes
Contents
require 'spec_helper' <% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%> describe "<%= formatted_namespace_path %><%= ns_table_name %>/new.html.<%= options[:template_engine] %>" do before(:each) do <%= "#{ns_file_name} = " if nested? %>assign(:<%= ns_file_name %>, Factory.build(:<%= ns_file_name %>) ) <%- base_parent_resources.each do |parent| -%> @<%= parent %> = assign(:<%= parent %>, <%= ns_file_name %>.<%= parent %>) <%- end -%> end it "renders new <%= ns_file_name %> form" do render rendered.should have_selector("form", :action => <%= list_resources_path_test nil, "@" %>, :method => "post") do |form| <% for attribute in output_attributes -%> form.should have_selector("<%= attribute.input_type -%>#<%= ns_file_name %>_<%= attribute.name %>", :name => "<%= ns_file_name %>[<%= attribute.name %>]") <% end -%> end end end
Version data entries
12 entries across 12 versions & 1 rubygems