<commit_before>require 'spec_helper'

describe 'Grape::Endpoint#path_and_definitions' do
  before do
    module API
      module V1
        class Item < Grape::API
          version 'v1', using: :path

          resource :item do
            get '/'
          end
        end
      end

      class Root < Grape::API
        mount API::V1::Item
        add_swagger_documentation add_version: true
      end
    end

    @options = { add_version: true}
    @target_routes = API::Root.combined_namespace_routes
  end

  it 'is returning a versioned path' do
    expect(API::V1::Item.endpoints[0]
      .path_and_definition_objects(@target_routes, @options)[0].keys[0]).to eql '/v1/item'
  end
end<commit_msg>Small typo fixed.<commit_after>require 'spec_helper'

describe 'Grape::Endpoint#path_and_definitions' do
  before do
    module API
      module V1
        class Item < Grape::API
          version 'v1', using: :path

          resource :item do
            get '/'
          end
        end
      end

      class Root < Grape::API
        mount API::V1::Item
        add_swagger_documentation add_version: true
      end
    end

    @options = { add_version: true }
    @target_routes = API::Root.combined_namespace_routes
  end

  it 'is returning a versioned path' do
    expect(API::V1::Item.endpoints[0]
      .path_and_definition_objects(@target_routes, @options)[0].keys[0]).to eql '/v1/item'
  end
end
{'fraction_non_alphanumeric': 0.09527170077628794, 'fraction_numerical': 0.011291460832745237, 'mean_word_length': 2.4168674698795183, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5823499', 'n_tokens_mistral': 460, 'n_tokens_neox': 447, 'n_words': 111}