Is DatabaseCleaner still necessary with Rails system specs? : <p>From all that I've read about Rails 5.1 new system specs my understanding was that Rails now handles database transactions internally. </p>

<p>From <a href="http://rspec.info/blog/2017/10/rspec-3-7-has-been-released/" rel="noreferrer">Rspec's blog</a>: "[previously] your tests and your code under test cannot share a database transaction, and so you cannot use RSpec's built in mechanism to roll back database changes, instead requiring a gem like database cleaner. With system tests, the Rails team has done the hard work to ensure that this is not the case, and so you can safely use RSpec's mechanism, without needing an extra gem."</p>

<p>My experience is different:  </p>

<ol>
<li>My Rspec feature tests were all passing after upgrading to Rails
5.1.   </li>
<li>I renamed the 'feature' specs to become 'system' specs. All tests passed.  </li>
<li>I removed the <a href="https://github.com/DatabaseCleaner/database_cleaner" rel="noreferrer">Database Cleaner</a> gem, and removed all references from <code>rails_helper.rb</code>. JS tests now fail due to <code>validates uniqueness</code> errors. Non-JS tests pass.</li>
</ol>

<p>My tests are very simple. </p>

<pre><code>let(:subject) { page }
let(:user) { create :user, name: "TestUser" }
it "displays the user page", :js do
  visit user_path(user)
  it is_expected.to have_content "TestUser"
end
</code></pre>

<p>With Database cleaner disabled and <code>:js =&gt; true</code> I get <code>user named TestUser already exists</code>. With <code>:js =&gt; false</code> the test passes. </p>

<p>What is the current situation with system tests and rspec? Does Rails handle database transactions internally, or is Database Cleaner still required? Has anyone encountered this, or can point me towards relevant info? </p>
