Back to Browse

RSpec Argument Matchers Explained

342 views
Oct 10, 2022
23:36

When mocking and stubbing Ruby code with RSpec, it can be helpful to use argument matchers to expect an object to receive a method call with various types of arguments. This is an advanced RSpec feature, but one that is particularly useful when testing conditional method call arguments. View the source for this episode: https://github.com/brettchalupa/screencasts/tree/master/rspec-arg-matchers-explained RSpec docs on this feature: https://relishapp.com/rspec/rspec-mocks/docs/setting-constraints/matching-arguments

Download

1 formats

Video Formats

360pmp438.5 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

RSpec Argument Matchers Explained | NatokHD