Add mirrors lambda test
diff --git a/test/mustache_test.dart b/test/mustache_test.dart
index 3e1649c..fc7aa0e 100644
--- a/test/mustache_test.dart
+++ b/test/mustache_test.dart
@@ -364,14 +364,19 @@
});
});
-// FIXME
-// group('Mirrors', () {
-// test('Simple field', () {
-// var output = parse('_{{bar}}_')
-// .renderString(new Foo()..bar = 'bob');
-// expect(output, equals('_bob_'));
-// });
-// });
+ group('Mirrors', () {
+ test('Simple field', () {
+ var output = parse('_{{bar}}_')
+ .renderString(new Foo()..bar = 'bob');
+ expect(output, equals('_bob_'));
+ });
+
+ test('Lambda', () {
+ var output = parse('_{{lambda}}_')
+ .renderString(new Foo()..lambda = (_) => 'yo');
+ expect(output, equals('_yo_'));
+ });
+ });
}
renderFail(source, values) {
@@ -395,4 +400,5 @@
class Foo {
String bar;
+ Function lambda;
}