Skip to content

Commit eb2faa9

Browse files
committed
Set the world for an isolated config
Otherwise, the worlds are out of sync: with_isolated_config do RSpec::Core::ExampleGroup.describe('a view') { it { } } RSpec.configuration.world.example_groups # => [] end
1 parent 60dc9c4 commit eb2faa9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spec/support/helpers.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module Helpers
44
def with_isolated_config
55
original_config = RSpec.configuration
66
RSpec.configuration = RSpec::Core::Configuration.new
7+
RSpec.configuration.world = RSpec.world
78
RSpec::Rails.initialize_configuration(RSpec.configuration)
89
yield RSpec.configuration
910
ensure

0 commit comments

Comments
 (0)