summaryrefslogtreecommitdiff
path: root/spec/initializers/00_deprecations_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/initializers/00_deprecations_spec.rb')
-rw-r--r--spec/initializers/00_deprecations_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/initializers/00_deprecations_spec.rb b/spec/initializers/00_deprecations_spec.rb
new file mode 100644
index 00000000000..e52e64415af
--- /dev/null
+++ b/spec/initializers/00_deprecations_spec.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe '00_deprecations' do
+ where(:warning) do
+ [
+ "ActiveModel::Errors#keys is deprecated and will be removed in Rails 6.2",
+ "Rendering actions with '.' in the name is deprecated:",
+ "default_hash is deprecated and will be removed from Rails 6.2"
+ ]
+ end
+
+ with_them do
+ specify do
+ expect { ActiveSupport::Deprecation.warn(warning) }
+ .to raise_error(ActiveSupport::DeprecationException)
+ end
+ end
+end