Enable .clean_with to receive simple arguments#18
Enable .clean_with to receive simple arguments#18deeeki wants to merge 1 commit intoamatsuda:masterfrom
.clean_with to receive simple arguments#18Conversation
|
Well, thanks, but I'm not really a fan of Actually I was also thinking of solving that API issue, and my take was like this: https://github.com/amatsuda/database_rewinder/compare/compat You see the main code looks totally simple and beautiful by putting these 💩s away, but I guess we need another handy interface for configuring |
|
Thanks for your comment. Yeah, separating modules looks fine. I think the simplest way is; DatabaseRewinder.only = ['foos'] # and also set to cleanersin most cases it will work good. But in case of changing options in a particular test, users have to take care of current so another ides is; DatabaseRewinder.cleaner_options = only: ['foos'], except: []this is kinda verbose but flexible and users can always write with just 1 line. |
This change enables the method to receive as the following
while keeping compatibility.
for DatabaseRewinder first-choice users 💨