`around(:context)` does not work as expected but does not provide a warning
Created by: myronmarston
We only support around(:example)
hooks but around(:context)
hooks do not raise an exception or print a warning or anything -- instead, they act just like an around(:example)
hook. Example:
RSpec.describe "Around" do
around(:context) do |ex|
puts "around before"
ex.run
puts "around after"
end
it 'works' do
puts "in example 1"
end
it 'works again' do
puts "in example 2"
end
end
This produces:
Around
around before
in example 2
around after
works again
around before
in example 1
around after
works
See #1598 (closed) for some background on this.