Docs and spec cleanup

This commit is contained in:
Brian P O'Rourke 2020-06-30 12:15:57 -07:00
parent d3078d14de
commit a25ae50bc1
No known key found for this signature in database
GPG key ID: 5B0C73433C16416F
2 changed files with 8 additions and 2 deletions

View file

@ -349,6 +349,12 @@ to one of the values specified in the url allowlist like so:
DatabaseCleaner.url_allowlist = ['postgres://postgres@localhost', 'postgres://foo@bar']
```
Allowlist elements may be specified as regular expressions if extra flexibility is required::
```ruby
DatabaseCleaner.url_allowlist = [%r{^postgres://postgres@localhost}]
```
## COPYRIGHT
See [LICENSE](LICENSE) for details.

View file

@ -86,7 +86,7 @@ module DatabaseCleaner
describe 'A remote url is not on the allowlist' do
let(:database_url) { 'postgress://bar.baz' }
it 'raises a allowlist error' do
it 'raises a not allowed error' do
expect { cleaner.start }.to raise_error(Safeguard::Error::UrlNotAllowed)
end
end
@ -94,7 +94,7 @@ module DatabaseCleaner
describe 'A similar url not explicitly matched as a pattern' do
let(:database_url) { 'postgres://foo.bar?pool=8' }
it 'raises an allowlist error' do
it 'raises a not allowed error' do
expect { cleaner.start }.to raise_error(Safeguard::Error::UrlNotAllowed)
end
end