# frozen_string_literal: true require 'rails_helper' RSpec.describe 'Pokemon', type: :system do let!(:pokemon) { create_list(:pokemon, 10) } context 'when on the index page' do before { visit('/pokemon') } it 'shows pokemon' do pokemon.each do |pkmn| expect(page).to have_text(pkmn.nickname) end end end end