I'm using rspec and capybara and would like to test a JSON response that I get in response to for example click_button. I understand that I can use :js => true but I would like to parse back the JSON that I get. I see that I can do something like:
get '/your/path', format: 'js'
Is there a way to do something like:
click_button('Save', format: 'js')
::JSON.parse(response)....
?
thx