Skip to content

Commit 3af8abf

Browse files
committed
do not test comments when disabled
1 parent 77ab3a5 commit 3af8abf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/controllers/active_admin_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
ActiveAdmin.application.namespaces[:admin].resources.each do |resource|
44
# resource_name will be empty for custom pages not backed by models
55
resource_name = resource.resource_name.instance_variable_get(:@klass)&.name&.underscore
6-
next if ["quality_control"].include?(resource_name)
6+
exclude_resources = ["quality_control"]
7+
exclude_resources += ["active_admin/comment"] unless ActiveAdmin.application.comments
8+
next if exclude_resources.include?(resource_name)
79

810
describe resource.controller, type: :controller do
911
let(:admin) { create(:admin) }

0 commit comments

Comments
 (0)