vcardigan 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/vcardigan/vcard.rb +0 -3
- data/lib/vcardigan/version.rb +1 -1
- data/spec/examples/vcard_spec.rb +15 -19
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ccf24ad70c7e77507a727fc711161d1b9a49914
|
4
|
+
data.tar.gz: ebf00bb504baef0a007c94f8982874ebf9a7cb1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1aff52e87d131553450fc836f2d6de3728f4e2f0cd4ac871f6cfc39eaad4c6bc089856d957a64787fb9ca42ba5de07690e323b7292010d7514903822ecd3056
|
7
|
+
data.tar.gz: 62e2de500251985a05245a4937c23124324bcf097dbb52b60d67fcec40034c187e70f3188683e20247d70a18332bf91da75bae12565ba0734067b36377f8d680
|
data/lib/vcardigan/vcard.rb
CHANGED
data/lib/vcardigan/version.rb
CHANGED
data/spec/examples/vcard_spec.rb
CHANGED
@@ -110,25 +110,14 @@ describe VCardigan::VCard do
|
|
110
110
|
end
|
111
111
|
|
112
112
|
context 'regardless of group' do
|
113
|
-
|
114
113
|
before do
|
115
114
|
vcard.add(name, *values)
|
116
115
|
end
|
117
116
|
|
118
|
-
context '
|
119
|
-
|
120
|
-
let(:values) { [nil, 'joe@strummer.com'] }
|
121
|
-
|
122
|
-
it 'should not build properties from nil args' do
|
123
|
-
fields[name.to_s].first.values.should == [values.last]
|
124
|
-
end
|
125
|
-
end
|
126
|
-
|
127
|
-
context 'all args are nil' do
|
128
|
-
|
117
|
+
context 'when all of the given values are nil' do
|
129
118
|
let(:values) { [nil, nil] }
|
130
119
|
|
131
|
-
it 'should not
|
120
|
+
it 'should not add anything to the fields hash' do
|
132
121
|
fields[name.to_s].should be_nil
|
133
122
|
end
|
134
123
|
end
|
@@ -302,16 +291,23 @@ describe VCardigan::VCard do
|
|
302
291
|
describe "#valid?" do
|
303
292
|
let(:vcard) { VCardigan.create }
|
304
293
|
|
305
|
-
context '
|
306
|
-
it '
|
307
|
-
expect(
|
294
|
+
context 'when full name has not been set' do
|
295
|
+
it 'should return false' do
|
296
|
+
expect(vcard).not_to be_valid
|
308
297
|
end
|
309
298
|
end
|
310
299
|
|
311
|
-
context '
|
312
|
-
it '
|
300
|
+
context 'when full name has been set' do
|
301
|
+
it 'should return true' do
|
313
302
|
vcard.fullname("My Name")
|
314
|
-
expect(
|
303
|
+
expect(vcard).to be_valid
|
304
|
+
end
|
305
|
+
end
|
306
|
+
|
307
|
+
context 'when full name has been set to nil' do
|
308
|
+
it 'should return false' do
|
309
|
+
vcard.fullname(nil)
|
310
|
+
expect(vcard).not_to be_valid
|
315
311
|
end
|
316
312
|
end
|
317
313
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vcardigan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|