The 
  ActionDispatch
  
    Show archive.org snapshot
  
 module of Rails gives you the helper method flash to access the flash messages in a response.
describe PostsController, type: :request do
  describe 'update' do
    it 'shows a success message on update' do
      post_record = create(:post)
      put "/posts/#{post_record.id}"
      # Same as @request.flash[:alert]
      expect(flash[:alert]).to eq('Post updated successfully.')
    end
  end
end
Posted by Emanuel to makandra dev (2021-03-08 12:58)