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