mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add missing proc call
This commit is contained in:
parent
3207b7c8d2
commit
e0f5862960
3 changed files with 4 additions and 4 deletions
|
@ -46,7 +46,7 @@ describe Spectator::ExampleHooks do
|
|||
|
||||
it "wraps a proc" do
|
||||
called = false
|
||||
hooks = new_hooks(around_each: ->(proc : ->) { called = true; nil })
|
||||
hooks = new_hooks(around_each: ->(proc : ->) { called = true; proc.call })
|
||||
wrapper = hooks.wrap_around_each { }
|
||||
wrapper.call
|
||||
called.should be_true
|
||||
|
|
|
@ -408,7 +408,7 @@ describe Spectator::NestedExampleGroup do
|
|||
|
||||
it "wraps a proc" do
|
||||
called = false
|
||||
hooks = new_hooks(around_each: ->(proc : ->) { called = true; nil })
|
||||
hooks = new_hooks(around_each: ->(proc : ->) { called = true; proc.call })
|
||||
wrapper = new_nested_group(hooks).wrap_around_each_hooks { }
|
||||
wrapper.call
|
||||
called.should be_true
|
||||
|
@ -440,7 +440,7 @@ describe Spectator::NestedExampleGroup do
|
|||
|
||||
it "wraps the parent hooks" do
|
||||
called = false
|
||||
hooks = new_hooks(around_each: ->(proc : ->) { called = true; nil })
|
||||
hooks = new_hooks(around_each: ->(proc : ->) { called = true; proc.call })
|
||||
root = Spectator::RootExampleGroup.new(hooks)
|
||||
wrapper = new_nested_group(parent: root).wrap_around_each_hooks { }
|
||||
wrapper.call
|
||||
|
|
|
@ -275,7 +275,7 @@ describe Spectator::RootExampleGroup do
|
|||
|
||||
it "wraps a proc" do
|
||||
called = false
|
||||
hooks = new_hooks(around_each: ->(proc : ->) { called = true; nil })
|
||||
hooks = new_hooks(around_each: ->(proc : ->) { called = true; proc.call })
|
||||
wrapper = new_root_group(hooks).wrap_around_each_hooks { }
|
||||
wrapper.call
|
||||
called.should be_true
|
||||
|
|
Loading…
Reference in a new issue