The project uses MongoDB, so this answers weren't helpfull: 1, 2, 3
I can successfully execute every test file, or even small groups of test files, but they fail when running all together. rspec spec/*
Finished in 23 minutes 45 seconds (files took 23.02 seconds to load)
2071 examples, 1357 failures, 28 pending
The project is a little bit old. MongoDB 3.6, Ruby 2.5.1 with Padrino as framework. Also, we use DatabaseCleaner and Fabrication. A lot of errors show the classic message of Sinatra doesn’t know this ditty.
61) BlogController POST :create Microsite request should return code 12 for invalid token
Failure/Error: @response_body = JSON.parse(last_response.body)
JSON::ParserError:
784: unexpected token at '<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body { text-align:center;font-family:helvetica,arial;font-size:22px;
color:#888;margin:20px}
#c {margin:0 auto;width:500px;text-align:left}
</style>
</head>
<body>
<h2>Sinatra doesn’t know this ditty.</h2>
<img src='http://localhost.la/__sinatra__/404.png'>
<div id="c">
Try this:
<pre># in app.rb
class Microsite
post '/v1/microsite/blog' do
"Hello World"
end
end
</pre>
</div>
</body>
</html>
'
In addition, my boss uses Apple and he had a likewise problem, related with WiredTiger. However, I'm using Ubuntu and MongoDB log file doesn't show WiredTiger errors while executing tests. It seems that he fixed it with a system configuration. Apparently Rspec was trying to open all the files in order to execute the tests and the process runned out of memory or something like that. Should I have to do some similar configuration in Ubuntu?