test/mote_test.rb in mote-1.3.0 vs test/mote_test.rb in mote-1.3.1

- old
+ new

@@ -88,9 +88,17 @@ def context.user; "Bruno"; end example = Mote.parse("{{ user }}", context) assert_equal "Bruno", example.call end + + test "context with name" do + context = Object.new + def context.name; "Sebas"; end + + example = Mote.parse("{{ self.name }}", context) + assert_equal "Sebas", example.call + end test "locals" do example = Mote.parse("{{ user }}", TOPLEVEL_BINDING, [:user]) assert_equal "Bruno", example.call(user: "Bruno") end