vcardigan 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vcardigan/vcard.rb +7 -0
- data/lib/vcardigan/version.rb +1 -1
- data/spec/examples/vcard_spec.rb +17 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 848d27844cf20837560cd7701c7adff92125468c
|
4
|
+
data.tar.gz: 3abfac9811f1d2c1f445c21fa48fb26a80f5fa45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afbd21e400c00e7613394c8233c12d373776a01d99fb9f75bc4e6aa7e5651ce52114f0adb90dc442cfd814d4fe38341ffdea7e5835e2d667c95fbc8740034c80
|
7
|
+
data.tar.gz: 512b60cd50f5e453198bb16d86bcc4755aea3915e2b10659203c1bd25c770a86786491d0efa4e946927996640276b6ad1d69f478234efe81625096ef0886c669
|
data/lib/vcardigan/vcard.rb
CHANGED
data/lib/vcardigan/version.rb
CHANGED
data/spec/examples/vcard_spec.rb
CHANGED
@@ -274,6 +274,23 @@ describe VCardigan::VCard do
|
|
274
274
|
end
|
275
275
|
end
|
276
276
|
|
277
|
+
describe "#valid?" do
|
278
|
+
let(:vcard) { VCardigan.create }
|
279
|
+
|
280
|
+
context 'with no FN' do
|
281
|
+
it 'it should return false' do
|
282
|
+
expect( vcard.valid? ).to be_false
|
283
|
+
end
|
284
|
+
end
|
285
|
+
|
286
|
+
context 'with FN' do
|
287
|
+
it 'it should return true' do
|
288
|
+
vcard.fullname("My Name")
|
289
|
+
expect( vcard.valid? ).to be_true
|
290
|
+
end
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
277
294
|
describe '#parse' do
|
278
295
|
context 'valid 4.0 vCard' do
|
279
296
|
let(:data) { File.read(File.dirname(__FILE__) + '/../helpers/joe.vcf') }
|