schemata-cloud_controller 0.0.1.beta1 → 0.0.1.beta2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Schemata
2
2
  module CloudController
3
- VERSION = "0.0.1.beta1"
3
+ VERSION = "0.0.1.beta2"
4
4
  end
5
5
  end
@@ -14,6 +14,7 @@ module Schemata
14
14
  @contents = {}
15
15
 
16
16
  data.each do |key, field_value|
17
+ key = Schemata::HashCopyHelpers.stringify(key)
17
18
  field_schema = @schema.schemas[key]
18
19
  next unless field_schema
19
20
 
@@ -44,6 +44,18 @@ shared_examples "a message" do
44
44
  msg_obj = message.new({first_key => bad_value})
45
45
  }.to raise_error(Schemata::UpdateAttributeError)
46
46
  end
47
+
48
+ it "should stringify keys when they are symbols" do
49
+ mock_hash = component.send(mock_method, 1).contents
50
+ first_key = mock_hash.keys[0]
51
+ first_value = mock_hash[first_key]
52
+
53
+ input_hash = {
54
+ first_key.to_sym => first_value
55
+ }
56
+ msg_obj = message.new(input_hash)
57
+ msg_obj.send(first_key).should_not be_nil
58
+ end
47
59
  end
48
60
 
49
61
  describe "#encode" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schemata-cloud_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.beta1
4
+ version: 0.0.1.beta2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: