I'm writing unit tests for a Rails service using minitest. A snippet of my test looks like this:
stub_request(:get, @service_url)
.with(:headers => @authheader)
.to_return(:body => "ABC", :status => 200)
get :index
After the get :index, response.code is 200 as expected (and I've changed it to 201 in the .to_return and seen that code be correct after get :index, but every time response.body is "". I'm sure I'm just doing something unimaginably dumb here and welcome being told what a dummy I am. :)
Thanks in advance
minitest 5.8.2 webmock 3.0.1 rails 4