<commit_before>require 'rails_helper'


module MockModuleToInclude
  def self.included(dsl)
  end
end

RSpec.describe ActiveAdmin::DSL do

  let(:application) { ActiveAdmin::Application.new }
  let(:namespace) { ActiveAdmin::Namespace.new application, :admin }
  let(:resource_config) { ActiveAdmin::Resource.new namespace, Post }
  let(:dsl){ ActiveAdmin::DSL.new(resource_config) }

  describe "#include" do

    it "should call the included class method on the module that is included" do
      expect(MockModuleToInclude).to receive(:included).with(dsl)
      dsl.run_registration_block do
        include MockModuleToInclude
      end
    end

  end


  describe '#action_item' do
    before do<commit_msg>Ensure resource controller is defined<commit_after>require 'rails_helper'


module MockModuleToInclude
  def self.included(dsl)
  end
end

RSpec.describe ActiveAdmin::DSL do

  let(:application) { ActiveAdmin::Application.new }
  let(:namespace) { ActiveAdmin::Namespace.new application, :admin }
  let(:resource_config) { namespace.register Post }
  let(:dsl){ ActiveAdmin::DSL.new(resource_config) }

  describe "#include" do

    it "should call the included class method on the module that is included" do
      expect(MockModuleToInclude).to receive(:included).with(dsl)
      dsl.run_registration_block do
        include MockModuleToInclude
      end
    end

  end


  describe '#action_item' do
    before do
{'fraction_non_alphanumeric': 0.09033613445378151, 'fraction_numerical': 0.0, 'mean_word_length': 4.2536764705882355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1319135', 'n_tokens_mistral': 431, 'n_tokens_neox': 407, 'n_words': 110}