PierreGambarotto/project_I_authentification — pull request #3 by lokhi (2012-03-06 20:32:40+00:00)
Title: 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, #, 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, #, 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,
+ #,
+ 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,
+ #,
+ 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 '

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