A Test with a View
Meanwhile, we still have this end-to-end test to wrap up. Letâs look at that test again:
test_first_rspec/04/gatherer/spec/features/add_project_spec.rb | |
â | require â"rails_helper"â |
â | |
â | describe â"adding projects"â âdoâ |
â | |
â | it â"allows a user to create a project with tasks"â âdoâ |
â | visit new_project_path |
â | fill_in â"Name"â, with: â"Project Runway"â |
â | fill_in â"Tasks"â, with: â"Task 1:3\nTask 2:5"â |
â | click_on(â"Create Project"â) |
â | visit projects_path |
â | expect(page).to have_content(â"Project Runway"â) |
â | expect(page).to have_content(â"8"â) |
â | âendâ |
â | |
â | âendâ |
So far weâve gotten this test to pass up to the visit projects_path line. ...
Get Rails 4 Test Prescriptions now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.