vcardigan 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fecc595fa698e75daf5a8fa962f921ca403a7bb1
4
- data.tar.gz: 42aca309a5059eb66eaf3f4c2c879c01f76955ee
3
+ metadata.gz: 5ccf24ad70c7e77507a727fc711161d1b9a49914
4
+ data.tar.gz: ebf00bb504baef0a007c94f8982874ebf9a7cb1c
5
5
  SHA512:
6
- metadata.gz: 47f0e8c1ff8ad181d2eed402c87d2d21059b28e6fcad55e8fa5656745099f0af9c6e611640292c21e3911432e34f4beb96ca93f0fbccb3c33a96257de466d27b
7
- data.tar.gz: 1377d0431be7981ccf7270cc7130c25f01612b04319e45e7659732eecaf1c871c93400edf9429493462bec3b8d37a0e27c4b0d0672831d50f33fb070f59d3f73
6
+ metadata.gz: c1aff52e87d131553450fc836f2d6de3728f4e2f0cd4ac871f6cfc39eaad4c6bc089856d957a64787fb9ca42ba5de07690e323b7292010d7514903822ecd3056
7
+ data.tar.gz: 62e2de500251985a05245a4937c23124324bcf097dbb52b60d67fcec40034c187e70f3188683e20247d70a18332bf91da75bae12565ba0734067b36377f8d680
@@ -65,9 +65,6 @@ module VCardigan
65
65
  @group = nil
66
66
  end
67
67
 
68
- args.reject!(&:nil?)
69
-
70
- # Build the property and add it to the vCard
71
68
  if args.any?
72
69
  property = build_prop(name, *args)
73
70
  add_prop(property)
@@ -1,5 +1,5 @@
1
1
  module VCardigan
2
2
 
3
- VERSION = '0.0.7'
3
+ VERSION = '0.0.8'
4
4
 
5
5
  end
@@ -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 'some args are nil' do
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 build properties' do
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 'with no FN' do
306
- it 'it should return false' do
307
- expect( vcard.valid? ).to be_false
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 'with FN' do
312
- it 'it should return true' do
300
+ context 'when full name has been set' do
301
+ it 'should return true' do
313
302
  vcard.fullname("My Name")
314
- expect( vcard.valid? ).to be_true
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.7
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-18 00:00:00.000000000 Z
11
+ date: 2015-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec