<commit_before>module World
  module Categories
    attr_accessor :current_category

    def category_containing_no_child_categories
      fixture 'categories/help-with-insurance.yml'
    end

    alias_method :category, :category_containing_no_child_categories

    def category_containing_child_categories
      fixture 'categories/insurance.yml'
    end

    def browse_to_category(category, locale)
      self.current_category = category

      category_page.load(locale: locale, id: category.id)
    end
  end
end

World(World::Categories)<commit_msg>Add helper method to return all categories in the repository<commit_after>module World
  module Categories
    attr_accessor :current_category

    def category_containing_no_child_categories
      fixture 'categories/help-with-insurance.yml'
    end

    alias_method :category, :category_containing_no_child_categories

    def category_containing_child_categories
      fixture 'categories/insurance.yml'
    end

    def browse_to_category(category, locale)
      self.current_category = category

      category_page.load(locale: locale, id: category.id)
    end

    def all_categories
      Core::Registries::Repository[:category].all
    end
  end
end

World(World::Categories)
{'fraction_non_alphanumeric': 0.05962933118452861, 'fraction_numerical': 0.0, 'mean_word_length': 4.090163934426229, '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': '2215462', 'n_tokens_mistral': 363, 'n_tokens_neox': 340, 'n_words': 76}