<commit_before>class ::ApplicationController
  def self.abstract?; false; end
end

module RSpec::Rails
  RSpec.describe ControllerExampleGroup do
    it_behaves_like "an rspec-rails example group mixin", :controller,
                    './spec/controllers/', '.\\spec\\controllers\\'

    def group_for(klass)
      RSpec::Core::ExampleGroup.describe klass do
        include ControllerExampleGroup
      end
    end

    let(:group) { group_for ApplicationController }

    it "includes routing matchers" do
      expect(group.included_modules).to include(RSpec::Rails::Matchers::RoutingMatchers)
    end

    it "handles methods invoked via `method_missing` that use keywords" do
      group =
        RSpec::Core::ExampleGroup.describe ApplicationController do
          def a_method(value:); value; end
          def method_missing(_name, *_args, **kwargs, &_block); a_method(**kwargs); end

          prepend ControllerExampleGroup
        end
      example = group.new

      expect(example.call_a_method(value: :value)).to eq :value
    end

    context "with implicit subject" do<commit_msg>Documentation for spec demonstrating method_missing issue<commit_after>class ::ApplicationController
  def self.abstract?; false; end
end

module RSpec::Rails
  RSpec.describe ControllerExampleGroup do
    it_behaves_like "an rspec-rails example group mixin", :controller,
                    './spec/controllers/', '.\\spec\\controllers\\'

    def group_for(klass)
      RSpec::Core::ExampleGroup.describe klass do
        include ControllerExampleGroup
      end
    end

    let(:group) { group_for ApplicationController }

    it "includes routing matchers" do
      expect(group.included_modules).to include(RSpec::Rails::Matchers::RoutingMatchers)
    end

    it "handles methods invoked via `method_missing` that use keywords" do
      group =
        RSpec::Core::ExampleGroup.describe ApplicationController do
          def a_method(value:); value; end
          def method_missing(_name, *_args, **kwargs, &_block); a_method(**kwargs); end

          # This example requires prepend so that the `method_missing` definition
          # from `ControllerExampleGroup` bubbles up to our artificial one, in reality
          # this is likely to be either an internal RSpec dispatch or one from a 3rd
          # party gem.
          prepend ControllerExampleGroup
        end
      example = group.new

      expect(example.call_a_method(value: :value)).to eq :value
    end

    context "with implicit subject" do
{'fraction_non_alphanumeric': 0.085680285600952, 'fraction_numerical': 0.0003966679888932963, 'mean_word_length': 3.1141924959216967, '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': '5560522', 'n_tokens_mistral': 693, 'n_tokens_neox': 665, 'n_words': 202}