I am using rspec with capybara for testing.
I want to test my api end point, I can do it with rspec. But while searching on net for api testing I found a gem vcr which can save api call response in yml file, So no multiple hit on server and also decrease test run time.
I have tried to configure it with local environment, But seems like it work for external api calls only.
Anyone having experience in configure with local environment setup.
Tried setup capaybara to run server in test environment but didn't get any success.
Capybara.configure do |config|
config.run_server = true
config.server_port = 7000
config.app_host = 'http://localhost:7000'
end
But getting following issue:
Errno::ECONNREFUSED:
Connection refused - connect(2) for "localhost" port 7000