database_rewinder
database_rewinder copied to clipboard
minimalist's tiny and ultra-fast database cleaner
In my model there was statement like: ```ruby establish_connection "my_connection_#{ Rails.env }" ``` In this case there was used [multiverse](https://github.com/ankane/multiverse) gem to configure 2nd DB in rails 4 project after...
I noticed that CI is failed in the edge Rails. `ActiveRecord::Base.configurations` in edge rails returns Symbol key. And I watched @JuanitoFatas and @eileencodes discussion. https://github.com/amatsuda/database_rewinder/pull/70#discussion_r392863164 I was referring to this...
DatabaesRewinder finds the wrong cleaner when using the same database name on different hosts. It occurs with the following database.yml. ```yaml default: &default adapter: postgresql encoding: unicode pool: username: postgres...
Hi, any plan to support [activerecord-import](https://github.com/zdennis/activerecord-import) gem? We use activerecord-import in production code, and use `DatabaseRewinder.clean` in our tests. When we run tests on activerecord-import related codes to perform bulk...
Maybe this approach would be relatively better than the current one?
handy interface for configuring `:except` and `:only` discussed #18 and asakusa.rb meetup. ``` ruby # Usage DatabaseRewinder.filter_options = { except: ["foos"] } DatabaseRewinder.clean_all ``` I named `filter_options=`, but I'll leave...
This change enables the method to receive as the following ``` ruby DatabaseRewinder.clean_with except: ["foos"] ``` while keeping compatibility. ``` ruby DatabaseRewinder.clean_with :truncation, except: ["foos"] ``` for DatabaseRewinder first-choice users...
When I change to database rewinder our tests become slower, because in many cases we used transaction strategy. Here is solution that worked for us: Use `DatabaseRewinder` only for capybara+js...
We are currently looking to implement this gem in a Rails Engine, however the Railtie initializer does not load. https://github.com/amatsuda/database_rewinder/blob/master/lib/database_rewinder/railtie.rb#L4 I am not familiar enough with Railtie to understand what...
[DatabaseCleaner](https://github.com/DatabaseCleaner/database_cleaner) recommends using `append_after` instead of `append` in their README to try to avoid this kind of issue: https://github.com/teamcapybara/capybara/issues/1089. Would it make sense for DatabaseRewinder to have the same instructions?