aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/fixtures
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-04-16 11:34:07 +0200
committerJosé Valim <jose.valim@gmail.com>2011-04-16 11:34:07 +0200
commitab105e6072d291d7024e4e645defa5eff31f6f21 (patch)
treeceb36f53f3f7ac692f0fa075e72ab683566220f1 /actionpack/test/fixtures
parent3e0aedba909562411b8f369115828a79a7a77a0a (diff)
downloadrails-ab105e6072d291d7024e4e645defa5eff31f6f21.tar.gz
rails-ab105e6072d291d7024e4e645defa5eff31f6f21.tar.bz2
rails-ab105e6072d291d7024e4e645defa5eff31f6f21.zip
content_for should work with provide.
Diffstat (limited to 'actionpack/test/fixtures')
-rw-r--r--actionpack/test/fixtures/layouts/streaming.erb4
-rw-r--r--actionpack/test/fixtures/test/nested_streaming.erb3
-rw-r--r--actionpack/test/fixtures/test/streaming.erb3
-rw-r--r--actionpack/test/fixtures/test/streaming_buster.erb3
4 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/fixtures/layouts/streaming.erb b/actionpack/test/fixtures/layouts/streaming.erb
new file mode 100644
index 0000000000..d3f896a6ca
--- /dev/null
+++ b/actionpack/test/fixtures/layouts/streaming.erb
@@ -0,0 +1,4 @@
+<%= yield :header -%>
+<%= yield -%>
+<%= yield :footer -%>
+<%= yield(:unknown).presence || "." -%> \ No newline at end of file
diff --git a/actionpack/test/fixtures/test/nested_streaming.erb b/actionpack/test/fixtures/test/nested_streaming.erb
new file mode 100644
index 0000000000..55525e0c92
--- /dev/null
+++ b/actionpack/test/fixtures/test/nested_streaming.erb
@@ -0,0 +1,3 @@
+<%- content_for :header do -%>?<%- end -%>
+<%= render :template => "test/streaming" %>
+? \ No newline at end of file
diff --git a/actionpack/test/fixtures/test/streaming.erb b/actionpack/test/fixtures/test/streaming.erb
new file mode 100644
index 0000000000..fb9b8b1ade
--- /dev/null
+++ b/actionpack/test/fixtures/test/streaming.erb
@@ -0,0 +1,3 @@
+<%- provide :header do -%>Yes, <%- end -%>
+this works
+<%- content_for :footer, " like a charm" -%>
diff --git a/actionpack/test/fixtures/test/streaming_buster.erb b/actionpack/test/fixtures/test/streaming_buster.erb
new file mode 100644
index 0000000000..4221d56dcc
--- /dev/null
+++ b/actionpack/test/fixtures/test/streaming_buster.erb
@@ -0,0 +1,3 @@
+<%= yield :foo -%>
+This won't look
+<% provide :unknown, " good." -%>