database_rewinder icon indicating copy to clipboard operation
database_rewinder copied to clipboard

Support for Rails Engines

Open frank-west-iii opened this issue 8 years ago • 1 comments

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 would need to be changed to make this work or if it is possible at all.

Do you know if this is possible to run in an Engine?

frank-west-iii avatar Feb 27 '17 19:02 frank-west-iii

I uploaded a sample engine with the reproduced error here: https://github.com/frank-west-iii/database_rewinder_engine

The error is:

bundle exec rspec spec

An error occurred in a `before(:suite)` hook.
Failure/Error: DatabaseRewinder.clean_all

NoMethodError:
  undefined method `empty?' for nil:NilClass

Finished in 0.01801 seconds (files took 1.09 seconds to load)
0 examples, 0 failures

Not sure this will help, but thought I would post it up just in case!

frank-west-iii avatar Feb 28 '17 15:02 frank-west-iii