Skip to content

Commit

Permalink
add spec to ensure saftey, but this wont work.. Also changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Jul 23, 2013
1 parent 7e61b6e commit 131addb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Expand Up @@ -29,6 +29,7 @@ Enhancements
* Times in profile output are now bold instead of failure_color.
(Matthew Boedicker)
* Add --no-fail-fast command line option. (Gonzalo Rodríguez-Baltanás Díaz)
* Clear shared example registry using accessor. (thepoho, Jon Rowe)

### 2.14.4 / 2013-07-21
[full changelog](http://github.com/rspec/rspec-core/compare/v2.14.3...v2.14.4)
Expand Down
8 changes: 8 additions & 0 deletions spec/rspec/core/shared_example_group_spec.rb
Expand Up @@ -11,6 +11,14 @@ module RSpec::Core
expect(Module.private_methods & seg_methods).to eq([])
end

module SharedExampleGroup
describe Registry do
it 'can safely be reset' do
expect { Registry.clear }.to_not raise_error
end
end
end

%w[share_examples_for shared_examples_for shared_examples shared_context].each do |shared_method_name|
describe shared_method_name do
it "is exposed to the global namespace" do
Expand Down

0 comments on commit 131addb

Please sign in to comment.