Permalink
Browse files

Updated rendered tests

  • Loading branch information...
1 parent 69bf402 commit d5682fc0db2ceadea74f650e7930ef4d3a3f117f julien@igel.co.jp committed May 7, 2012
Showing with 8 additions and 5 deletions.
  1. +1 −0 lib/params.html
  2. +3 −2 tests/rendered.html
  3. +4 −3 tests/rendered.xml
View
@@ -23,6 +23,7 @@
var args = flexo.get_args(), watches = [], context, load;
load = function () {
+ console.log("load", this);
this.uses.params.clear();
watches.forEach(function (w) { flexo.safe_remove(w); });
watches = [];
View
@@ -7,7 +7,7 @@
<style>
body { font-family: Univers, "Helvetica Neue", Helvetica, sans-serif; }
</style>
- <script src="../flexo.js"></script>
+ <script src="../flexo-new.js"></script>
<script src="../bender.js"></script>
</head>
<body>
@@ -16,7 +16,8 @@
context.appendChild(
context.$("component",
context.$("view",
- context.$("html:p", "Rendered? ", context.$("html:span#rendered"))),
+ context.$("html:p", "Rendered? ",
+ context.$("html:span#rendered", "No :("))),
context.$("watch",
context.$("get", { use: "$self", event: "@rendered" }),
context.$("set", { view: "rendered" }, "return 'Yes!';"))));
View
@@ -1,11 +1,12 @@
-<component xmlns="http://bender.igel.co.jp">
+<app xmlns="http://bender.igel.co.jp">
+ <title>@rendered test</title>
<view>
<p xmlns="http://www.w3.org/1999/xhtml">
- Rendered? <span id="rendered"/>
+ Rendered? <span id="rendered">No :(</span>
</p>
</view>
<watch>
<get use="$self" event="@rendered"/>
<set view="rendered">return "Yes!";</set>
</watch>
-</component>
+</app>

0 comments on commit d5682fc

Please sign in to comment.