From d222f016e454ebfbabf3875e26b3d17052d39a40 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Wed, 21 Aug 2024 14:47:59 +1200 Subject: [PATCH] More tests. --- test/bake/context.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/bake/context.rb b/test/bake/context.rb index dfbed2e..4b720ab 100644 --- a/test/bake/context.rb +++ b/test/bake/context.rb @@ -71,5 +71,23 @@ expect(events).to be == [:before, :after] end + + it "can wrap unspecified methods" do + events = [] + + context.wrap('wrap') do + before do + events << :before + end + + after do + events << :after + end + end + + context.call('wrap') + + expect(events).to be == [:before, :after] + end end end