rlmoser99 / ruby_rspec_TOP

A tutorial that I developed for students at The Odin Project to learn RSpec.

Home Page:https://github.com/TheOdinProject/ruby_testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove using subject from tests

rlmoser99 opened this issue · comments

Implicitly defined subject should not be used (except for custom matchers, extension libraries, and one-liners), based on:
https://relishapp.com/rspec/rspec-core/v/3-9/docs/subject/implicitly-defined-subject
http://www.betterspecs.org/#subject

However, using explicit subjects is acceptable, based on:
https://relishapp.com/rspec/rspec-core/docs/subject/explicit-subject
https://rspec.rubystyle.guide/#use-subject
https://rspec.rubystyle.guide/#subject-naming-in-context
Plus, the betterspec's link above.