When a user visits the new author page
Then the page should render
Hints
Before you begin implementing this feature, write a test to document its absence.
The file spec/features/author/new_author_spec.rb already contains the needed test case, it only needs to be un-commented.
The describe block defines which aspect of the the software will be tested here.
Specifying the feature type automatically includes helper methods that allow to simulate browser actions in a test.
Inside describe, each it block is a single test case.
In this example, the test simply tries to access the URL of the new-author page.
This fails because no such path is defined yet.
Commit the failing test case.
Now, this test needs to be made to pass. See the Rails tutorial for help in generating the appropriate controllers and setting up routes.
You can learn more about RSpec, the testing framework, in this documentation
Error
Got NameError: undefined local variable or method `new_author_path' for #
Did you mean? new_polymorphic_path
Scenario
When a user visits the new author page Then the page should render
Hints
Before you begin implementing this feature, write a test to document its absence. The file
spec/features/author/new_author_spec.rb
already contains the needed test case, it only needs to be un-commented.The
describe
block defines which aspect of the the software will be tested here. Specifying thefeature
type automatically includes helper methods that allow to simulate browser actions in a test. Insidedescribe
, eachit
block is a single test case. In this example, the test simply tries to access the URL of the new-author page. This fails because no such path is defined yet.Commit the failing test case.
Now, this test needs to be made to pass. See the Rails tutorial for help in generating the appropriate controllers and setting up routes. You can learn more about RSpec, the testing framework, in this documentation
Error
Estimated progress: 2% complete