lib/generators/leolay/templates/lib/templates/rspec/scaffold/show_spec.rb in leonardo-1.5.0 vs lib/generators/leolay/templates/lib/templates/rspec/scaffold/show_spec.rb in leonardo-1.6.0
- old
+ new
@@ -15,9 +15,12 @@
<% output_attributes = attributes.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%>
describe "<%= ns_table_name %>/show.html.<%= options[:template_engine] %>" do
before(:each) do
@<%= ns_file_name %> = assign(:<%= ns_file_name %>, Factory(:<%= ns_file_name %>) )
+ <%- base_parent_resources.each do |parent| -%>
+ @<%= parent %> = assign(:<%= parent %>, @<%= ns_file_name %>.<%= parent %>)
+ <%- end -%>
end
it "renders attributes" do
render
<% for attribute in output_attributes -%>