I'm trying to setup the best way to setup several expectations against a controller action. Everything I'm running across seems to suggest that this should be working, but only the first expectation will pass. If I switch the order, it doesn't matter, it is always the first one that passes. I'm sure I'm missing something obvious at this point and I need a second pair of eyes to help me. Any thoughts?
subject(:post_image) { -> { post :create, location_id: location.id, reconstruction_id: reconstruction.id, image: {image: Rack::Test::UploadedFile.new(Rails.root.join('spec', 'fixtures', 'files', 'test1500white.png'), 'image/png') } } }
it { is_expected.to change(Image, :count).by(1) }
it { is_expected.to change(AssetRelation, :count).by(1) }