Making RSpec Tests More Robust
23-Jul-2020 1530
RSpec is a popular framework for testing Ruby code. With an expect assertion, a developer can make sure their code calls the proper method or an acceptable result is returned. The expect().to receive matcher in a test overrides the default implementation and can cause some unintended side effects.To demonstrate this potential problem, assume a very simple API client exists that can update models.
Making RSpec Tests More Robust #ruby #rubydeveloper #rubyonrails #Making #RSpec #Tests #Robust #rspec #tests https://rubyonrails.ba/link/making-rspec-tests-more-robust