require 'rails_helper' RSpec.describe "events/new", type: :view do before(:each) do assign(:event, Event.new( name: "MyString" )) end it "renders new event form" do render assert_select "form[action=?][method=?]", events_path, "post" do assert_select "input[name=?]", "event[name]" end end end