Perello louis

Bonjour, 
Je vous contact car j'ai un souci au niveau de mon utilisateurs et du mot de passe je souhaite le crypte avant de le mettre dans la base de donnée mais lorsque j'ajoute le module password. Le test échoue et donne l'erreur suivant :

1) User Encryption of the password should include the password module
     Failure/Error: User.included_modules.should include(Password)
       expected [User::GeneratedFeatureMethods, #<Module:0xa2d34bc>, ActiveRecord::Aggregations, ActiveRecord::Transactions, ActiveRecord::Reflection, ActiveRecord::Serialization, ActiveModel::Serializers::Xml, ActiveModel::Serializers::JSON, ActiveModel::Serialization, ActiveRecord::Store, ActiveRecord::AutosaveAssociation, ActiveRecord::NestedAttributes, ActiveModel::SecurePassword, ActiveRecord::IdentityMap, ActiveRecord::Associations, ActiveModel::Validations::Callbacks, ActiveRecord::Callbacks, ActiveModel::Observing, ActiveRecord::Timestamp, ActiveRecord::AttributeMethods::DeprecatedUnderscoreRead, ActiveRecord::AttributeMethods::Serialization, ActiveRecord::AttributeMethods::Dirty, ActiveModel::Dirty, ActiveRecord::AttributeMethods::TimeZoneConversion, ActiveRecord::AttributeMethods::PrimaryKey, ActiveRecord::AttributeMethods::Query, ActiveRecord::AttributeMethods::BeforeTypeCast, #<Module:0x987a36c>, ActiveRecord::AttributeMethods::Write, ActiveRecord::AttributeMethods::Read, ActiveRecord::AttributeMethods, ActiveModel::AttributeMethods, ActiveRecord::Locking::Optimistic, ActiveRecord::Locking::Pessimistic, ActiveRecord::Validations, ActiveModel::Validations::HelperMethods, ActiveModel::Validations, ActiveSupport::Callbacks, ActiveModel::Conversion, ActiveRecord::AttributeAssignment, ActiveModel::MassAssignmentSecurity, ActiveRecord::Integration, ActiveRecord::Sanitization, ActiveRecord::Scoping::Named, ActiveRecord::Scoping::Default, ActiveRecord::Scoping, ActiveRecord::Inheritance, ActiveRecord::ModelSchema, ActiveRecord::ReadonlyAttributes, ActiveRecord::Persistence, RSpec::Mocks::Methods, Sinatra::Delegator, JSON::Ext::Generator::GeneratorMethods::Object, ActiveSupport::Dependencies::Loadable, PP::ObjectMixin, RSpec::Core::SharedExampleGroup, RSpec::Core::DSL, Kernel] to include Password
       Diff:
       @@ -1,2 +1,59 @@
       -[Password]
       +[User::GeneratedFeatureMethods,
       + #<Module:0xa2d34bc>,
       + ActiveRecord::Aggregations,
       + ActiveRecord::Transactions,
       + ActiveRecord::Reflection,
       + ActiveRecord::Serialization,
       + ActiveModel::Serializers::Xml,
       + ActiveModel::Serializers::JSON,
       + ActiveModel::Serialization,
       + ActiveRecord::Store,
       + ActiveRecord::AutosaveAssociation,
       + ActiveRecord::NestedAttributes,
       + ActiveModel::SecurePassword,
       + ActiveRecord::IdentityMap,
       + ActiveRecord::Associations,
       + ActiveModel::Validations::Callbacks,
       + ActiveRecord::Callbacks,
       + ActiveModel::Observing,
       + ActiveRecord::Timestamp,
       + ActiveRecord::AttributeMethods::DeprecatedUnderscoreRead,
       + ActiveRecord::AttributeMethods::Serialization,
       + ActiveRecord::AttributeMethods::Dirty,
       + ActiveModel::Dirty,
       + ActiveRecord::AttributeMethods::TimeZoneConversion,
       + ActiveRecord::AttributeMethods::PrimaryKey,
       + ActiveRecord::AttributeMethods::Query,
       + ActiveRecord::AttributeMethods::BeforeTypeCast,
       + #<Module:0x987a36c>,
       + ActiveRecord::AttributeMethods::Write,
       + ActiveRecord::AttributeMethods::Read,
       + ActiveRecord::AttributeMethods,
       + ActiveModel::AttributeMethods,
       + ActiveRecord::Locking::Optimistic,
       + ActiveRecord::Locking::Pessimistic,
       + ActiveRecord::Validations,
       + ActiveModel::Validations::HelperMethods,
       + ActiveModel::Validations,
       + ActiveSupport::Callbacks,
       + ActiveModel::Conversion,
       + ActiveRecord::AttributeAssignment,
       + ActiveModel::MassAssignmentSecurity,
       + ActiveRecord::Integration,
       + ActiveRecord::Sanitization,
       + ActiveRecord::Scoping::Named,
       + ActiveRecord::Scoping::Default,
       + ActiveRecord::Scoping,
       + ActiveRecord::Inheritance,
       + ActiveRecord::ModelSchema,
       + ActiveRecord::ReadonlyAttributes,
       + ActiveRecord::Persistence,
       + RSpec::Mocks::Methods,
       + Sinatra::Delegator,
       + JSON::Ext::Generator::GeneratorMethods::Object,
       + ActiveSupport::Dependencies::Loadable,
       + PP::ObjectMixin,
       + RSpec::Core::SharedExampleGroup,
       + RSpec::Core::DSL,
       + Kernel]
     # ./spec/user_spec.rb:41:in `block (3 levels) in <top (required)>'

Finished in 0.07408 seconds
5 examples, 1 failure


Je pense qu'il y a un souci entre l'attribut password du module et le password de la base mais je ne vois pas comment faire.


Merci.


Cordialement,

Louis PERELLO