Navigation Menu

Skip to content

Commit

Permalink
Move render_test to AV
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszx0 committed Aug 25, 2013
1 parent aa2d003 commit acc8e25
Show file tree
Hide file tree
Showing 93 changed files with 1,950 additions and 1,420 deletions.
1,648 changes: 228 additions & 1,420 deletions actionpack/test/controller/render_test.rb

Large diffs are not rendered by default.

1,572 changes: 1,572 additions & 0 deletions actionview/test/actionpack/render_test.rb

Large diffs are not rendered by default.

@@ -0,0 +1 @@
<%= greeting %> bad customer: <%= bad_customer.name %><%= bad_customer_counter %>
@@ -0,0 +1 @@
<%= greeting %>: <%= customer.name %>
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/fun/games/_form.erb
@@ -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 %>
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/hello.html
@@ -0,0 +1 @@
Hello world!
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/layouts/_customers.erb
@@ -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 %>
3 changes: 3 additions & 0 deletions actionview/test/fixtures/actionpack/layouts/builder.builder
@@ -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 %>
2 changes: 2 additions & 0 deletions actionview/test/fixtures/actionpack/layouts/xhr.html.erb
@@ -0,0 +1,2 @@
XHR!
<%= yield %>
2 changes: 2 additions & 0 deletions actionview/test/fixtures/actionpack/layouts/yield.erb
@@ -0,0 +1,2 @@
<title><%= yield :title %></title>
<%= yield %>
@@ -0,0 +1 @@
<%= question.name %>
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/shared.html.erb
@@ -0,0 +1 @@
Elastica
@@ -0,0 +1 @@
HTML
@@ -0,0 +1 @@
JSON
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/_counter.html.erb
@@ -0,0 +1 @@
<%= counter_counter %>
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/_customer.erb
@@ -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 @@
Hello <%= name %>
@@ -0,0 +1 @@
<%= render :partial => "test/second_json_partial" %>
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/_form.erb
@@ -0,0 +1 @@
<%= form.label :title %>
@@ -0,0 +1 @@
<%= greeting %>: <%= hash_greeting[:first_name] %>
2 changes: 2 additions & 0 deletions actionview/test/fixtures/actionpack/test/_hash_object.erb
@@ -0,0 +1,2 @@
<%= hash_object[:first_name] %>
<%= hash_object[:first_name].reverse %>
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/_hello.builder
@@ -0,0 +1 @@
xm.hello
Empty file.
@@ -0,0 +1 @@
<%= labelling_form.label :title %>
@@ -0,0 +1,3 @@
Before (<%= name %>)
<%= yield %>
After
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/_partial.erb
@@ -0,0 +1 @@
invalid
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/_partial.html.erb
@@ -0,0 +1 @@
partial html
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/_partial.js.erb
@@ -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 %>
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/_partial_only.erb
@@ -0,0 +1 @@
only partial
@@ -0,0 +1 @@
only html partial
@@ -0,0 +1,2 @@
<%= render 'test/partial' %>
partial with partial
2 changes: 2 additions & 0 deletions actionview/test/fixtures/actionpack/test/_person.erb
@@ -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 @@
Third level
@@ -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" }) %>
4 changes: 4 additions & 0 deletions actionview/test/fixtures/actionpack/test/capturing.erb
@@ -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
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/content_for.erb
@@ -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>
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/greeting.html.erb
@@ -0,0 +1 @@
<p>This is grand!</p>
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/greeting.xml.erb
@@ -0,0 +1 @@
<p>This is grand!</p>
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/hello,world.erb
@@ -0,0 +1 @@
Hello w*rld!
4 changes: 4 additions & 0 deletions actionview/test/fixtures/actionpack/test/hello.builder
@@ -0,0 +1,4 @@
xml.html do
xml.p "Hello #{@name}"
xml << render(:file => "test/greeting")
end
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/hello/hello.erb
@@ -0,0 +1 @@
Hello world!
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/hello_world.erb
@@ -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 @@
Hello world!
@@ -0,0 +1,2 @@
Hello world!
<%= render '/test/partial' %>
11 changes: 11 additions & 0 deletions actionview/test/fixtures/actionpack/test/hello_xml_world.builder
@@ -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 %>
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/hyphen-ated.erb
@@ -0,0 +1 @@
Hello world!
@@ -0,0 +1,2 @@
xml.atom do
end
1 change: 1 addition & 0 deletions actionview/test/fixtures/actionpack/test/list.erb
@@ -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 @@
<%= @todo %>
@@ -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 @@
Hey HTML!
@@ -0,0 +1 @@
Hello HTML!
@@ -0,0 +1 @@
alert('hello');
@@ -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.