Add missing proc call

This commit is contained in:
Michael Miller 2018-11-26 14:27:32 -07:00
parent 3207b7c8d2
commit e0f5862960
3 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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