README.md in unidom-visitor-1.13.8 vs README.md in unidom-visitor-1.13.9
- old
+ new
@@ -176,10 +176,17 @@
### RSpec shared examples (to be integrated)
```ruby
# The Unidom::Visitor::Password model already include the Unidom::Visitor::Concerns::AsCredential concern
+# lib/unidom.rb
+Unidom::Contact::EmailAddress.class_eval do
+
+ include Unidom::Visitor::Concerns::AsIdentity
+
+end
+
# app/models/your_credential.rb
class YourCredential < ApplicationRecord
include Unidom::Common::Concerns::ModelExtension
include Unidom::Visitor::Concerns::AsCredential
@@ -195,8 +202,23 @@
model_attribtues = {
your_attribute: 'your value'
}
it_behaves_like 'Unidom::Visitor::Concerns::AsCredential', model_attribtues
+
+end
+
+# spec/models/unidom/contact/email_address_spec.rb
+describe Unidom::Contact::EmailAddress, type: :model do
+
+ context do
+
+ model_attribtues = {
+ full_address: "#{SecureRandom.hex 16}@#{SecureRandom.hex 8}.com"
+ }
+
+ it_behaves_like 'Unidom::Visitor::Concerns::AsIdentity', model_attribtues
+
+ end
end
```