touch spec/features/todo_lists/destroy_spec.rb
require 'spec_helper'
describe "Delegint todo lists" do
let!(:todo_list) { TodoList.create(title: "Groceries", description: "Grocery list")}
it "is sucessful when clicking the destroy link" do
visit "/todo_lists"
within "#todo_list_#{todo_list.id}" do
click_link "Destroy"
end
expect(page).to_not have_content(todo_list.title)
expect(TodoList.count).to eq(0)
end
end
- Command do we use to run the entire test suite: rake spec