You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
All around hooks execute immediately surrounding an example, this means that all before hooks will have run and no after hooks will have run yet.
Your environment
Ruby version: 2.7.1p83
rspec-core version: 3.9.2
Steps to reproduce
Here's the example I used
RSpec.configure do |config|
config.before(:each) do
puts 'before in configure'
end
end
RSpec.describe "Order" do
before(:each) do
puts 'before in describe'
end
around do |t|
puts 'around started'
t.run
puts 'around exiting'
end
it 'some example' do
end
end
Expected behavior
I would expect the prints in before to show before the prints in around since
all before hooks will have run
Actual behavior
This is the output I get
around started
before in configure
before in describe
around exiting
Subject of the issue
Contrary to documentation,
aroundhooks runs beforebeforeDescribe your issue here.
The docs here https://www.rubydoc.info/gems/rspec-core/RSpec%2FCore%2FHooks%3Aaround says -
Your environment
Steps to reproduce
Here's the example I used
Expected behavior
I would expect the prints in
beforeto show before the prints inaroundsinceActual behavior
This is the output I get