Permalink
Browse files

Move render_test to AV

  • Loading branch information...
lukaszx0 committed Aug 5, 2013
1 parent aa2d003 commit acc8e25902902a7123fb34aaf143f73a8ef729dd
Showing with 1,950 additions and 1,420 deletions.
  1. +228 −1,420 actionpack/test/controller/render_test.rb
  2. +1,572 −0 actionview/test/actionpack/render_test.rb
  3. +1 −0 actionview/test/fixtures/actionpack/bad_customers/_bad_customer.html.erb
  4. +1 −0 actionview/test/fixtures/actionpack/customers/_customer.html.erb
  5. +1 −0 actionview/test/fixtures/actionpack/fun/games/_form.erb
  6. +1 −0 actionview/test/fixtures/actionpack/fun/games/hello_world.erb
  7. +1 −0 actionview/test/fixtures/actionpack/good_customers/_good_customer.html.erb
  8. +1 −0 actionview/test/fixtures/actionpack/hello.html
  9. +1 −0 actionview/test/fixtures/actionpack/layouts/_customers.erb
  10. +3 −0 actionview/test/fixtures/actionpack/layouts/block_with_layout.erb
  11. +3 −0 actionview/test/fixtures/actionpack/layouts/builder.builder
  12. +3 −0 actionview/test/fixtures/actionpack/layouts/partial_with_layout.erb
  13. +1 −0 actionview/test/fixtures/actionpack/layouts/standard.html.erb
  14. +2 −0 actionview/test/fixtures/actionpack/layouts/talk_from_action.erb
  15. +1 −0 actionview/test/fixtures/actionpack/layouts/with_html_partial.html.erb
  16. +2 −0 actionview/test/fixtures/actionpack/layouts/xhr.html.erb
  17. +2 −0 actionview/test/fixtures/actionpack/layouts/yield.erb
  18. +1 −0 actionview/test/fixtures/actionpack/quiz/questions/_question.html.erb
  19. +1 −0 actionview/test/fixtures/actionpack/shared.html.erb
  20. +1 −0 actionview/test/fixtures/actionpack/test/_changing_priority.html.erb
  21. +1 −0 actionview/test/fixtures/actionpack/test/_changing_priority.json.erb
  22. +1 −0 actionview/test/fixtures/actionpack/test/_counter.html.erb
  23. +1 −0 actionview/test/fixtures/actionpack/test/_customer.erb
  24. +1 −0 actionview/test/fixtures/actionpack/test/_customer_counter.erb
  25. +1 −0 actionview/test/fixtures/actionpack/test/_customer_counter_with_as.erb
  26. +1 −0 actionview/test/fixtures/actionpack/test/_customer_greeting.erb
  27. +1 −0 actionview/test/fixtures/actionpack/test/_customer_with_var.erb
  28. +1 −0 actionview/test/fixtures/actionpack/test/_directory/_partial_with_locales.html.erb
  29. +1 −0 actionview/test/fixtures/actionpack/test/_first_json_partial.json.erb
  30. +1 −0 actionview/test/fixtures/actionpack/test/_form.erb
  31. +1 −0 actionview/test/fixtures/actionpack/test/_hash_greeting.erb
  32. +2 −0 actionview/test/fixtures/actionpack/test/_hash_object.erb
  33. +1 −0 actionview/test/fixtures/actionpack/test/_hello.builder
  34. 0 actionview/test/fixtures/actionpack/test/_json_change_priority.json.erb
  35. +1 −0 actionview/test/fixtures/actionpack/test/_labelling_form.erb
  36. +3 −0 actionview/test/fixtures/actionpack/test/_layout_for_partial.html.erb
  37. +1 −0 actionview/test/fixtures/actionpack/test/_partial.erb
  38. +1 −0 actionview/test/fixtures/actionpack/test/_partial.html.erb
  39. +1 −0 actionview/test/fixtures/actionpack/test/_partial.js.erb
  40. +1 −0 actionview/test/fixtures/actionpack/test/_partial_for_use_in_layout.html.erb
  41. +1 −0 actionview/test/fixtures/actionpack/test/_partial_html_erb.html.erb
  42. +1 −0 actionview/test/fixtures/actionpack/test/_partial_name_local_variable.erb
  43. +1 −0 actionview/test/fixtures/actionpack/test/_partial_only.erb
  44. +1 −0 actionview/test/fixtures/actionpack/test/_partial_only_html.html
  45. +2 −0 actionview/test/fixtures/actionpack/test/_partial_with_partial.erb
  46. +2 −0 actionview/test/fixtures/actionpack/test/_person.erb
  47. +13 −0 actionview/test/fixtures/actionpack/test/_raise_indentation.html.erb
  48. +1 −0 actionview/test/fixtures/actionpack/test/_second_json_partial.json.erb
  49. +2 −0 actionview/test/fixtures/actionpack/test/action_talk_to_layout.erb
  50. +1 −0 actionview/test/fixtures/actionpack/test/calling_partial_with_layout.html.erb
  51. +4 −0 actionview/test/fixtures/actionpack/test/capturing.erb
  52. +2 −0 actionview/test/fixtures/actionpack/test/change_priority.html.erb
  53. +1 −0 actionview/test/fixtures/actionpack/test/content_for.erb
  54. +3 −0 actionview/test/fixtures/actionpack/test/content_for_concatenated.erb
  55. +2 −0 actionview/test/fixtures/actionpack/test/content_for_with_parameter.erb
  56. +1 −0 actionview/test/fixtures/actionpack/test/dot.directory/render_file_with_ivar.erb
  57. +1 −0 actionview/test/fixtures/actionpack/test/formatted_html_erb.html.erb
  58. +1 −0 actionview/test/fixtures/actionpack/test/formatted_xml_erb.builder
  59. +1 −0 actionview/test/fixtures/actionpack/test/formatted_xml_erb.html.erb
  60. +1 −0 actionview/test/fixtures/actionpack/test/formatted_xml_erb.xml.erb
  61. +1 −0 actionview/test/fixtures/actionpack/test/greeting.html.erb
  62. +1 −0 actionview/test/fixtures/actionpack/test/greeting.xml.erb
  63. +1 −0 actionview/test/fixtures/actionpack/test/hello,world.erb
  64. +4 −0 actionview/test/fixtures/actionpack/test/hello.builder
  65. +1 −0 actionview/test/fixtures/actionpack/test/hello/hello.erb
  66. +1 −0 actionview/test/fixtures/actionpack/test/hello_world.erb
  67. +3 −0 actionview/test/fixtures/actionpack/test/hello_world_container.builder
  68. +3 −0 actionview/test/fixtures/actionpack/test/hello_world_from_rxml.builder
  69. +1 −0 actionview/test/fixtures/actionpack/test/hello_world_with_layout_false.erb
  70. +2 −0 actionview/test/fixtures/actionpack/test/hello_world_with_partial.html.erb
  71. +11 −0 actionview/test/fixtures/actionpack/test/hello_xml_world.builder
  72. +1 −0 actionview/test/fixtures/actionpack/test/html_template.html.erb
  73. +1 −0 actionview/test/fixtures/actionpack/test/hyphen-ated.erb
  74. +2 −0 actionview/test/fixtures/actionpack/test/implicit_content_type.atom.builder
  75. +1 −0 actionview/test/fixtures/actionpack/test/list.erb
  76. +4 −0 actionview/test/fixtures/actionpack/test/non_erb_block_content_for.builder
  77. +4 −0 actionview/test/fixtures/actionpack/test/potential_conflicts.erb
  78. +1 −0 actionview/test/fixtures/actionpack/test/proper_block_detection.erb
  79. +1 −0 actionview/test/fixtures/actionpack/test/render_file_from_template.html.erb
  80. +1 −0 actionview/test/fixtures/actionpack/test/render_file_with_ivar.erb
  81. +1 −0 actionview/test/fixtures/actionpack/test/render_file_with_locals.erb
  82. +1 −0 actionview/test/fixtures/actionpack/test/render_file_with_locals_and_default.erb
  83. +1 −0 actionview/test/fixtures/actionpack/test/render_implicit_html_template_from_xhr_request.da.html.erb
  84. +1 −0 actionview/test/fixtures/actionpack/test/render_implicit_html_template_from_xhr_request.html.erb
  85. +1 −0 actionview/test/fixtures/actionpack/test/render_implicit_js_template_without_layout.js.erb
  86. +1 −0 actionview/test/fixtures/actionpack/test/render_partial_inside_directory.html.erb
  87. +1 −0 actionview/test/fixtures/actionpack/test/render_to_string_test.erb
  88. +2 −0 actionview/test/fixtures/actionpack/test/render_two_partials.html.erb
  89. +1 −0 actionview/test/fixtures/actionpack/test/using_layout_around_block.html.erb
  90. +1 −0 actionview/test/fixtures/actionpack/test/with_html_partial.html.erb
  91. +1 −0 actionview/test/fixtures/actionpack/test/with_partial.html.erb
  92. +1 −0 actionview/test/fixtures/actionpack/test/with_partial.text.erb
  93. +1 −0 actionview/test/fixtures/actionpack/test/with_xml_template.html.erb

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1 @@
+<%= greeting %> bad customer: <%= bad_customer.name %><%= bad_customer_counter %>
@@ -0,0 +1 @@
+<%= greeting %>: <%= customer.name %>
@@ -0,0 +1 @@
+<%= form.label :title %>
@@ -0,0 +1 @@
+Living in a nested world
@@ -0,0 +1 @@
+<%= greeting %> good customer: <%= good_customer.name %><%= good_customer_counter %>
@@ -0,0 +1 @@
+Hello world!
@@ -0,0 +1 @@
+<title><%= yield Struct.new(:name).new("David") %></title>
@@ -0,0 +1,3 @@
+<%= render(:layout => "layout_for_partial", :locals => { :name => "Anthony" }) do %>Inside from first block in layout<% "Return value should be discarded" %><% end %>
+<%= yield %>
+<%= render(:layout => "layout_for_partial", :locals => { :name => "Ramm" }) do %>Inside from second block in layout<% end %>
@@ -0,0 +1,3 @@
+xml.wrapper do
+ xml << yield
+end
@@ -0,0 +1,3 @@
+<%= render( :layout => "layout_for_partial", :partial => "partial_for_use_in_layout", :locals => {:name => 'Anthony' } ) %>
+<%= yield %>
+<%= render( :layout => "layout_for_partial", :partial => "partial_for_use_in_layout", :locals => {:name => 'Ramm' } ) %>
@@ -0,0 +1 @@
+<html><%= yield %><%= @variable_for_layout %></html>
@@ -0,0 +1,2 @@
+<title><%= @title || yield(:title) %></title>
+<%= yield -%>
@@ -0,0 +1 @@
+<%= render :partial => "partial_only_html" %><%= yield %>
@@ -0,0 +1,2 @@
+XHR!
+<%= yield %>
@@ -0,0 +1,2 @@
+<title><%= yield :title %></title>
+<%= yield %>
@@ -0,0 +1 @@
+<%= question.name %>
@@ -0,0 +1 @@
+Elastica
@@ -0,0 +1 @@
+<%= counter_counter %>
@@ -0,0 +1 @@
+Hello: <%= customer.name rescue "Anonymous" %>
@@ -0,0 +1 @@
+<%= customer_counter.name %><%= customer_counter_counter %>
@@ -0,0 +1 @@
+<%= client.name %><%= client_counter %>
@@ -0,0 +1 @@
+<%= greeting %>: <%= customer_greeting.name %>
@@ -0,0 +1 @@
+<%= customer.name %> <%= customer.name %> <%= customer.name %>
@@ -0,0 +1 @@
+<%= render :partial => "test/second_json_partial" %>
@@ -0,0 +1 @@
+<%= form.label :title %>
@@ -0,0 +1 @@
+<%= greeting %>: <%= hash_greeting[:first_name] %>
@@ -0,0 +1,2 @@
+<%= hash_object[:first_name] %>
+<%= hash_object[:first_name].reverse %>
@@ -0,0 +1 @@
+xm.hello
@@ -0,0 +1 @@
+<%= labelling_form.label :title %>
@@ -0,0 +1,3 @@
+Before (<%= name %>)
+<%= yield %>
+After
@@ -0,0 +1 @@
+invalid
@@ -0,0 +1 @@
+partial html
@@ -0,0 +1 @@
+partial js
@@ -0,0 +1 @@
+Inside from partial (<%= name %>)
@@ -0,0 +1 @@
+<%= "partial.html.erb" %>
@@ -0,0 +1 @@
+<%= partial_name_local_variable %>
@@ -0,0 +1 @@
+only partial
@@ -0,0 +1 @@
+only html partial
@@ -0,0 +1,2 @@
+<%= render 'test/partial' %>
+partial with partial
@@ -0,0 +1,2 @@
+Second: <%= name %>
+Third: <%= @name %>
@@ -0,0 +1,13 @@
+<p>First paragraph</p>
+<p>Second paragraph</p>
+<p>Third paragraph</p>
+<p>Fourth paragraph</p>
+<p>Fifth paragraph</p>
+<p>Sixth paragraph</p>
+<p>Seventh paragraph</p>
+<p>Eight paragraph</p>
+<p>Ninth paragraph</p>
+<p>Tenth paragraph</p>
+<%= raise "error here!" %>
+<p>Eleventh paragraph</p>
+<p>Twelfth paragraph</p>
@@ -0,0 +1,2 @@
+<% @title = "Talking to the layout" -%>
+Action was here!
@@ -0,0 +1 @@
+<%= render(:layout => "layout_for_partial", :partial => "partial_for_use_in_layout", :locals => { :name => "David" }) %>
@@ -0,0 +1,4 @@
+<% days = capture do %>
+ Dreamy days
+<% end %>
+<%= days %>
@@ -0,0 +1,2 @@
+<%= render :partial => "test/json_change_priority", formats: :json %>
+HTML Template, but <%= render :partial => "test/changing_priority" %> partial
@@ -0,0 +1 @@
+<% content_for :title do -%>Putting stuff in the title!<% end -%>Great stuff!
@@ -0,0 +1,3 @@
+<% content_for :title, "Putting stuff "
+ content_for :title, "in the title!" -%>
+Great stuff!
@@ -0,0 +1,2 @@
+<% content_for :title, "Putting stuff in the title!" -%>
+Great stuff!
@@ -0,0 +1 @@
+The secret is <%= @secret %>
@@ -0,0 +1 @@
+formatted html erb
@@ -0,0 +1 @@
+xml.test 'failed'
@@ -0,0 +1 @@
+<test>passed formatted html erb</test>
@@ -0,0 +1 @@
+<test>passed formatted xml erb</test>
@@ -0,0 +1 @@
+<p>This is grand!</p>
@@ -0,0 +1 @@
+<p>This is grand!</p>
@@ -0,0 +1 @@
+Hello w*rld!
@@ -0,0 +1,4 @@
+xml.html do
+ xml.p "Hello #{@name}"
+ xml << render(:file => "test/greeting")
+end
@@ -0,0 +1 @@
+Hello world!
@@ -0,0 +1 @@
+Hello world!
@@ -0,0 +1,3 @@
+xml.test do
+ render :partial => 'hello', :locals => { :xm => xml }
+end
@@ -0,0 +1,3 @@
+xml.html do
+ xml.p "Hello"
+end
@@ -0,0 +1,2 @@
+Hello world!
+<%= render '/test/partial' %>
@@ -0,0 +1,11 @@
+xml.html do
+ xml.head do
+ xml.title "Hello World"
+ end
+
+ xml.body do
+ xml.p "abes"
+ xml.p "monks"
+ xml.p "wiseguys"
+ end
+end
@@ -0,0 +1 @@
+<%= render :partial => "test/first_json_partial", formats: :json %>
@@ -0,0 +1 @@
+Hello world!
@@ -0,0 +1,2 @@
+xml.atom do
+end
@@ -0,0 +1 @@
+<%= @test_unchanged = 'goodbye' %><%= render :partial => 'customer', :collection => @customers %><%= @test_unchanged %>
@@ -0,0 +1,4 @@
+content_for :title do
+ 'Putting stuff in the title!'
+end
+xml << "Great stuff!"
@@ -0,0 +1,4 @@
+First: <%= @name %>
+<%= render :partial => "person", :locals => { :name => "Stephan" } -%>
+Fourth: <%= @name %>
+Fifth: <%= name %>
@@ -0,0 +1 @@
+<%= render :file => @path %>
@@ -0,0 +1 @@
+The secret is <%= @secret %>
@@ -0,0 +1 @@
+The secret is <%= secret %>
@@ -0,0 +1 @@
+<%= secret ||= 'one' %>
@@ -0,0 +1 @@
+<%= render partial: 'test/_directory/partial_with_locales', locals: {'name' => 'Jane'} %>
@@ -0,0 +1 @@
+The value of foo is: ::<%= @foo %>::
@@ -0,0 +1,2 @@
+<%= render :partial => 'partial', :locals => {'first' => '1'} %>
+<%= render :partial => 'partial', :locals => {'second' => '2'} %>
@@ -0,0 +1 @@
+<%= render(:layout => "layout_for_partial", :locals => { :name => "David" }) do %>Inside from block<% end %>
@@ -0,0 +1 @@
+<strong><%= render :partial => "partial_only_html" %></strong>
@@ -0,0 +1 @@
+<strong><%= render :partial => "partial_only" %></strong>
@@ -0,0 +1 @@
+**<%= render :partial => "partial_only" %>**
@@ -0,0 +1 @@
+<%= render :template => "test/greeting", :formats => :xml %>

0 comments on commit acc8e25

Please sign in to comment.