Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions spec/controllers/admin/orders_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Test Authorization by using the Pundit concern and an example policy,
# which will test all the authorization functionality.

# standard:disable Lint/ConstantDefinitionInBlock
describe Admin::OrdersController, type: :controller do
context "with namespaced Punditize concern" do
controller(Admin::OrdersController) do
Expand Down Expand Up @@ -107,4 +106,3 @@ def send_request(order:)
end
end
end
# standard:enable Lint/ConstantDefinitionInBlock
4 changes: 2 additions & 2 deletions spec/features/authorization_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require "rails_helper"

# standard:disable Lint/ConstantDefinitionInBlock
describe "authorization" do
before do
# standard:disable Lint/ConstantDefinitionInBlock
class TestProductPolicy < ProductPolicy
class Scope < ProductPolicy::Scope
def resolve
Expand All @@ -14,6 +14,7 @@ def show?
false
end
end
# standard:enable Lint/ConstantDefinitionInBlock

@original_product_policy = Product.policy_class
Product.policy_class = TestProductPolicy
Expand Down Expand Up @@ -55,4 +56,3 @@ def become_user(customer)
expect(page).to have_css(".js-table-row", count: 1)
end
end
# standard:enable Lint/ConstantDefinitionInBlock
4 changes: 2 additions & 2 deletions spec/lib/administrate/search_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
require "administrate/base_dashboard"
require "administrate/search"

# standard:disable Lint/ConstantDefinitionInBlock
describe Administrate::Search do
before :all do
# standard:disable Lint/ConstantDefinitionInBlock
module Administrate
module SearchSpecMocks
class MockRecord < ApplicationRecord
Expand Down Expand Up @@ -69,6 +69,7 @@ class FooDashboard < Administrate::BaseDashboard
end
end
end
# standard:enable Lint/ConstantDefinitionInBlock
end

after :all do
Expand Down Expand Up @@ -225,4 +226,3 @@ class User < ApplicationRecord
end
end
end
# standard:enable Lint/ConstantDefinitionInBlock