pokemon_spec.rb 347 B

1234567891011121314151617
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. RSpec.describe 'Pokemon', type: :system do
  4. let!(:pokemon) { create_list(:pokemon, 10) }
  5. context 'on the index page' do
  6. before { visit('/pokemon') }
  7. it 'shows me pokemon' do
  8. pokemon.each do |pkmn|
  9. expect(page).to have_text pkmn.nickname
  10. end
  11. end
  12. end
  13. end