1.8 KiB
1.8 KiB
Phase 001 Execution
Scope
- Prepared the Rails/RSpec project baseline before adding application models.
- Added a minimal visible root page for the application.
- Documented the project test command.
Changes
- Confirmed
rspec-railsandfactory_bot_railsare present in the Gemfile. - Added
capybarafor system spec support. - Enabled RSpec spec type inference from file location.
- Included FactoryBot syntax methods in RSpec configuration.
- Configured system specs to use Capybara's
rack_testdriver by default. - Added
HomeController#indexas a placeholder landing page. - Set the root route to
home#index. - Added a minimal root page view.
- Added a request spec for
GET /. - Added a system spec for the placeholder landing page.
- Added
bundle exec rspecto the CI sequence. - Updated
README.mdwith the RSpec command and local CI command.
Decisions
- FactoryBot is the preferred future test data setup because it is already in the Gemfile.
- Capybara is required because
rspec-railssystem specs depend on it for browser-style interactions. rack_testis enough for the baseline placeholder system spec and avoids requiring Selenium before JavaScript browser coverage is needed.- No model specs were added because there are no real application models yet.
- The root page is intentionally plain because Phase 001 only requires a visible landing point.
- The documented test command is
bundle exec rspec, matching project agent notes.
Verification
- Initial
bundle exec rspecfailed becausecapybarawas not in the bundle. - After adding
capybara,bundle exec rspecfailed because the default system spec driver expectedselenium-webdriver. - Configured system specs to use
rack_test, then reran verification. - Passed:
bundle exec rspec - Passed:
bin/rubocop - Passed:
bin/ci