Sha256: e62f1bc8f7a896a83e88074ff2301e4a6c61c54885982df2384e12b1f68fc7a0
Contents?: true
Size: 668 Bytes
Versions: 2
Compression:
Stored size: 668 Bytes
Contents
<% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%> RSpec.describe "<%= ns_table_name %>/new", type: :view do let(:<%= ns_file_name %>) { build :<%= ns_file_name %> } before do assign :<%= ns_file_name %>, <%= 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 -%> assert_select "<%= attribute.input_type -%>#<%= ns_file_name %>_<%= attribute.name %>[name=?]", "<%= ns_file_name %>[<%= attribute.name %>]" <% end -%> end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
stationed-0.6.0 | lib/templates/rspec/scaffold/new_spec.rb |
stationed-0.5.0 | lib/templates/rspec/scaffold/new_spec.rb |