meilisearch-ruby icon indicating copy to clipboard operation
meilisearch-ruby copied to clipboard

Choose better names to index in tests

Open brunoocasali opened this issue 3 years ago • 0 comments

We should use better names to our indexes in the tests like this:

  • https://github.com/meilisearch/meilisearch-ruby/blob/e19ccc50ea636ee48cd394cb5a4c14f9ef2b6251/spec/meilisearch/index/base_spec.rb#L73
  • https://github.com/meilisearch/meilisearch-ruby/blob/e19ccc50ea636ee48cd394cb5a4c14f9ef2b6251/spec/meilisearch/index/base_spec.rb#L110
  • https://github.com/meilisearch/meilisearch-ruby/blob/e19ccc50ea636ee48cd394cb5a4c14f9ef2b6251/spec/meilisearch/index/base_spec.rb#L5

We can choose books, people, songs, animals, and other simple words to help the understanding of our tests.

Another good step is to provide a way to randomize the final index name as we have in the rails package:

https://github.com/meilisearch/meilisearch-rails/blob/9790a6635096a905d823ce1ee2c70c0aba5a2e15/spec/spec_helper.rb#L51-L57

brunoocasali avatar Aug 01 '22 14:08 brunoocasali