Re: [Rails] Re: Rspec passes test only for one time

2016-06-21 Thread Deepak Sharma
On Tue, Jun 21, 2016 at 10:06 PM, wrote: > > > Alternatively, check out the database_cleaner gem. Thanks above gem works for me :) -- Cheers! Deepak Kumar Sharma Guru Nanak Dev Engineering College India! Blog: http://deekysharma.wordpress.com -- You received

[Rails] Re: Rspec passes test only for one time

2016-06-21 Thread jim
Your test database isn't being cleared after each test run. Normally this problem is solved by running each test in a transaction which is rolled back at the completion of each test. You can enable this in RSpec with the use_transactional_fixtures option. Alternatively, check out the