testing-rspec/README.md
private keyword in specs.eq to == in RSpec.expect syntax.allow syntax for method stubs.not_to instead of to_not in RSpec expectations.have_css matcher to the have_selector matcher in Capybara
assertions.any_instance in rspec-mocks and mocha; Prefer dependency
injection.its, specify, and before in RSpec.let (or let!) in RSpec. Prefer extracting helper methods, but do not
re-implement the functionality of let.
Example.subject explicitly inside of an RSpec it block.
Example.WebMock.disable_net_connect!.Delayed::Job matcher.it examples.it example or test method for each execution path through the method.[id] attributes.it block descriptions that add no information, such as "successfully."it block descriptions that repeat the top-level describe block
description.System module.ROLE_ACTION_spec.rb, such as user_changes_password_spec.rb,
for system spec file names.describe block per system spec file.it block descriptions that describe the success and failure paths.[class] or [data-*] attributes.[role] or [aria-*]
attributes) when asserting an element's state.<input type="checkbox"> element and [checked], an <option> element and
[selected]) over WAI-ARIA States and Properties (e.g. a <button> element and
[aria-checked="true"], a <div> element and [aria-selected="true"]).system specs were previously called feature specs and lived in
spec/features
factories.rb contents: sequences, traits, factory definitions.it block descriptions with should. Use Imperative mood
instead.subject blocks to define objects for use in one-line specs.
Example.describe blocks..method to describe class methods and #method to describe instance
methods.context to describe testing preconditions.describe '#method_name' to group tests by method-under-testdescribe ClassName block.