Skip to content

Commit

Permalink
Start on ContextHook spec
Browse files Browse the repository at this point in the history
  • Loading branch information
icy-arctic-fox committed Aug 19, 2024
1 parent be8d0a2 commit 28364c5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/spectator/core/context_hook_spec.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
require "../../spec_helper"

alias ContextHook = Spectator::Core::ContextHook

Spectator.describe ContextHook do
describe "#call" do
it "calls the block" do
called = false
hook = ContextHook.new(:before) { called = true }
expect { hook.call }.to change { called }.from(false).to(true)
end
end
end

0 comments on commit 28364c5

Please sign in to comment.