Skip to content

Commit 44e5857

Browse files
committed
Add test for AlreadyConfiguredError
1 parent 0cce2ec commit 44e5857

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

spec/lib/secure_headers_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ module SecureHeaders
2121
end.to raise_error(Configuration::NotYetConfiguredError)
2222
end
2323

24+
it "raises a AlreadyConfiguredError if trying to configure and default has already been set " do
25+
Configuration.default
26+
expect do
27+
Configuration.default
28+
end.to raise_error(Configuration::AlreadyConfiguredError)
29+
end
30+
2431
it "raises and ArgumentError when referencing an override that has not been set" do
2532
expect do
2633
Configuration.default

0 commit comments

Comments
 (0)