Search⌘ K

The Days Are Action-Packed

Explore how to resolve errors by adding Rails controller actions and creating basic view templates. Learn how Capybara interacts with form elements, and understand the importance of crafting form fields correctly to pass tests. Gain hands-on experience in building forms with text fields, text areas, and submit buttons to advance the test-driven development process in Rails applications.

We'll cover the following...

Running the tests now gives a different error since we’ve defined new_project_path:

rsync -avr --progress /usercode/* /usr/local/educative/gatherer --exclude Gemfile --exclude Gemfile.lock --exclude execute_.sh --exclude execute.sh
cd /usr/local/educative/gatherer
clear
bundle exec rspec
Updated Rails app, after adding new models and migrations

We need a new action in the Projects controller. Since it won’t have logic beyond Rails’s boilerplate, we don’t need to test anything more than the existing Capybara test does:

Ruby
class ProjectsController < ApplicationController
def new
@project = Project.new
end
end

Running the specs now triggers an error because Rails expects to ...