Skip to content

Commit

Permalink
Revert "update docstring and simulate spec circumstances"
Browse files Browse the repository at this point in the history
This reverts commit e7d7856.
  • Loading branch information
myronmarston committed Jul 23, 2013
1 parent e7d7856 commit aeb4eca
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions spec/rspec/core/shared_example_group_spec.rb
Expand Up @@ -3,9 +3,6 @@
module RSpec::Core
describe SharedExampleGroup do

before do
SharedExampleGroup::Registry.clear
end
ExampleModule = Module.new
ExampleClass = Class.new

Expand All @@ -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
Expand Down

0 comments on commit aeb4eca

Please sign in to comment.