entity_store 0.3.5 → 0.3.6

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: a15a515aaab833170cd1874dd0ed2bcb878747d6
4
- data.tar.gz: c5f62d569ebace43e4ac6f3f18de1ede780b1c25
3
+ metadata.gz: 1d58d67428adc9e2cf8beb83e2c878d3d0b72d8f
4
+ data.tar.gz: 8fdcc2c436e37ac607e1bf050005e20faa6647ae
5
5
  SHA512:
6
- metadata.gz: af5c80820dc57d1904b6d5f64d4742004a851fc5782b12a33ed56ece03a528d6fd55cc96644ff929ed1ded844492eedc11e9d9dae9578992fa6873a542a722b4
7
- data.tar.gz: 06d3cef2139723f728274332e512a2b0e8f30686421dfa7825d3816d6eaf6dce1ac598bb204c784c4295412e651556fd1fca5b01a0ceb8b82bcc52d60cf2435f
6
+ metadata.gz: 48b58c0013d6f7eb1ea0e31ada051bca1ef4c47f7e5beb3631262ccc1bf365baecdd2c163cd42f95d7a9e521583c55b9fcaa564f00e5432abdb1e3d73a9d701a
7
+ data.tar.gz: bd63ad41b92b710e1cf9e753f340d0c54c217905105b993f071475b77a214cd0576825a6ba1a2e7bece6a2ad3fbf5275917ad4eed42e86b655e3149dbc131af5
@@ -33,7 +33,7 @@ module EntityStore
33
33
  end
34
34
 
35
35
  define_method("#{name}=") do |values|
36
- mapped_values = values.map do |value|
36
+ mapped_values = (values || []).map do |value|
37
37
  case value
38
38
  when Hash
39
39
  klass.new(value)
@@ -1,3 +1,3 @@
1
1
  module EntityStore
2
- VERSION = "0.3.5".freeze
2
+ VERSION = "0.3.6".freeze
3
3
  end
@@ -143,6 +143,15 @@ describe Entity do
143
143
  entity.things.should eq(items)
144
144
  end
145
145
  end
146
+ context "when passed nil" do
147
+ before(:each) do
148
+ entity.things = nil
149
+ end
150
+
151
+ it "should result in an empty array" do
152
+ entity.things.should be_empty
153
+ end
154
+ end
146
155
  end
147
156
 
148
157
  describe "getter" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entity_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Bird