Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
test_app within extensions fails to run devise-migrations #1966
If, in the specs of the extension, you then refer to Spree::User, an error will be raised
One of the devise-migrations introduces a password_salt column, which is required by spree_auth and spree_devise_auth in the Spree::User model.
Two missing columns are "password_salt" and "encrypted_password".
The test_app raketask should probably check for migrations in any included gem and run them too. In this case, it should probably find the devise-migrations when devise is required by the extension.
Not sure if related, but after adding password_salt and encrypted_password manually to the test-datbase, an error occurs about a relation not being found:
This seems to be caused by a migration in spree_devise_auth not being ran.
Within the extension.
Here is how to reproduce (on a clean RVM gemset):
Now note the database having a spree_user table, but lacking several columns.
There should be a column password_salt and one called hashed_password. Instead there are several obsoleted columns (like salt). one may recognise an old table scheme here. Which it is: several devise-releases and upgrades worth of migrations have not been ran on this table.
That's typically caused by Spree.user_class not being set correctly in Config/initializers/spree.rb. What's its value now? It should be Spree::User.
On 14/09/2012, at 17:15, Bèr Kessels firstname.lastname@example.org wrote:
I'm having this issue with Spree 1-3-stable (1.3.2) as of now.
I don't seem to butt into this issue until I attempt to start writing request specs with a user factory to login.
Manually altering the dummy app's spree initialize to use