monkey patch using capybara

I am using capybara minitest on windows using selenium driver … webkit driver would require me to install QT so I am avoiding that

I am trying to simulate things like http error on an ajax request. I have this test in my feature as shown below.
I have a library that I include in my real controller, I then monkey patch that in my test to throw a 500 error. This seems to work,
but if I run “rake test:features” the tests all do not run because the monkey patch effects the other tests it seems. I am not sure there is a better approach ?
otherwise my tests have to be run individually somehow

the call: all(’.submit-btn’) causes the controller submit_req action …