Sha256: 49438beb4855fa50f75117ed49dc519b67f38de3af0c5dc56b94d2ce8303e9a9
Contents?: true
Size: 716 Bytes
Versions: 1
Compression:
Stored size: 716 Bytes
Contents
require 'spec_helper' <% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%> describe "<%= ns_table_name %>/new.html.<%= options[:template_engine] %>" do before(:each) do assign(:<%= ns_file_name %>, Factory.build(:<%= ns_file_name %>) ) end it "renders new <%= ns_file_name %> form" do render rendered.should have_selector("form", :action => <%= index_helper %>_path, :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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
leonardo-1.5.0 | lib/generators/leolay/templates/lib/templates/rspec/scaffold/new_spec.rb |