Tejas' Blog - Arbitrary handling of mock arguments in RSpec
07-Feb-2025 86
Testing mock arguments with ease in RSpec.
In my previous blog we saw how to write custom matchers in RSpec. Now we will see how to test arguments of mocked methods.
We usually mock method calls with expect().to receive(). Further we can also check if the method was called with correct arguments:.
Tejas' Blog - Arbitrary handling of mock arguments in RSpec #ruby #rubydeveloper #rubyonrails #Tejas' #Arbitrary #handling #arguments #RSpec #blog #rspec https://rubyonrails.ba/link/tejas-blog-arbitrary-handling-of-mock-arguments-in-rspec