Open chrislawrence opened 2 years ago
I'm out of the loop on this. What's the naming scheme? What should the template look like?
Based on precedent, we probably want to further overload this onto :Eintegrationtest
.
naming scheme is spec/system/widget_system_spec.rb
template is:
require "rails_helper"
RSpec.describe "Widget management", :type => :system do
before do
driven_by(:rack_test)
end
it "enables me to create widgets" do
visit "/widgets/new"
fill_in "Name", :with => "My Widget"
click_button "Create Widget"
expect(page).to have_text("Widget was successfully created.")
end
end
From https://relishapp.com/rspec/rspec-rails/docs/system-specs/system-spec
Probably adding another section like this will be sufficient:
For templates we strive for the smallest possible, no example tests or anything like that. One can use the generator to get those.
Rspec system specs have largely replaced feature specs for high end testing. It would be nice to have an :Esystem command to edit these specs.