swt2-intro-exercise / rails-exercise-20-felixauringer

rails-exercise-20-felixauringer created by GitHub Classroom
MIT License
0 stars 0 forks source link

Author page should display author details #5

Closed swt2public closed 3 years ago

swt2public commented 3 years ago

Scenario

Given an author named 'Alan Turing' When a user visits Turing's details page Then no error should occour

Hints

A 'show' page displays an author's details. In a test, visit the show page of @alan with visit author_path(@alan).

Create a separate file for author show page feature tests. Make sure it ends with _spec.rb, so that RSpec recognizes it as a test and runs it. Test for existence of text on a page using the have_text matcher: expect(page).to have_text(...).

Create a show action on the AuthorsController and a 'show' view (app/views/authors/show.html.erb). Here is the relevant section of the guide.

Tip: FactoryBot.create :author creates and saves a valid author object in your tests. If you un-comment the code in spec/factories/authors.rb, the author will be initialized with meaningful values.

Error

Got NoMethodError: undefined method `author_path' for # Did you mean? authors_path

7/44 exercise tests have passed

felixauringer commented 3 years ago

Fixed in afd2011774a6cfdad218f5218c06bc93370a819a