spec/models/album_detection_photo_iterator_spec.rb
Prefer have_received
for setting message expectations. Setup AlbumDetector
as a spy using allow
or instance_spy
. Open
Open
expect(AlbumDetector).to(receive(:detect_albums!).exactly(5).times { [] })
- Exclude checks
Use and_return
for static values. Open
Open
expect(AlbumDetector).to(receive(:detect_albums!).exactly(5).times { [] })
- Exclude checks
The second argument to describe should be the method being tested. '#instance' or '.class'. Open
Open
describe AlbumDetectionPhotoIterator, 'run' do
- Exclude checks
Spec path should end with album_detection_photo_iterator*run*_spec.rb
. Open
Open
describe AlbumDetectionPhotoIterator, 'run' do
- Exclude checks