Skip to content

Commit

Permalink
add test verifying deprecation notice is posted
Browse files Browse the repository at this point in the history
  • Loading branch information
oreoshake committed Feb 12, 2018
1 parent 98ac406 commit 60fd282
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ group :guard do
gem "growl"
gem "guard-rspec", platforms: [:ruby_19, :ruby_20, :ruby_21, :ruby_22, :ruby_23, :ruby_24]
gem "rb-fsevent"
gem 'terminal-notifier-guard'
end
5 changes: 5 additions & 0 deletions spec/lib/secure_headers/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ module SecureHeaders
expect(Configuration.get(Configuration::DEFAULT_CONFIG, internal: true)).to_not be_nil
end

it "warns when using deprecated internal-ish #get API" do
expect(Kernel).to receive(:warn).once.with(/`#get` is deprecated/)
Configuration.get(Configuration::DEFAULT_CONFIG)
end

it "has an 'noop' config" do
expect(Configuration.get(Configuration::NOOP_CONFIGURATION, internal: true)).to_not be_nil
end
Expand Down

0 comments on commit 60fd282

Please sign in to comment.