From aeb4ecac2be0fd9e624beca805e05f7a3ca81624 Mon Sep 17 00:00:00 2001 From: Myron Marston Date: Tue, 23 Jul 2013 09:22:14 -0700 Subject: [PATCH] Revert "update docstring and simulate spec circumstances" This reverts commit e7d78564027a83b1442e94583815640cf2502048. --- spec/rspec/core/shared_example_group_spec.rb | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/spec/rspec/core/shared_example_group_spec.rb b/spec/rspec/core/shared_example_group_spec.rb index 20f949bf37..277b349a97 100644 --- a/spec/rspec/core/shared_example_group_spec.rb +++ b/spec/rspec/core/shared_example_group_spec.rb @@ -3,9 +3,6 @@ module RSpec::Core describe SharedExampleGroup do - before do - SharedExampleGroup::Registry.clear - end ExampleModule = Module.new ExampleClass = Class.new @@ -16,15 +13,7 @@ module RSpec::Core module SharedExampleGroup describe Registry do - #simulate the circumstances where reset would break... - around do |example| - @cache = Registry.instance_variable_get('@shared_example_groups') - Registry.instance_variable_set('@shared_example_groups',nil) - example.run - Registry.instance_variable_set('@shared_example_groups',@cache) - end - - it "can be reset safely when there aren't any shared example groups" do + it 'can safely be reset' do expect { Registry.clear }.to_not raise_error end end