spec/entity_spec.rb in scudco-taza-0.8.6 vs spec/entity_spec.rb in scudco-taza-0.8.7
- old
+ new
@@ -19,7 +19,17 @@
it "should be able to return a hash object" do
entity = Taza::Entity.new({:apple => 'pie' },nil)
entity.to_hash[:apple].should eql('pie')
end
+
+ it "should be able to do string-to-symbol conversion for hash keys using to_hash" do
+ entity = Taza::Entity.new({'apple' => 'pie' },nil)
+ entity.to_hash[:apple].should eql('pie')
+ end
+
+ it "should be able to do string-to-symbol conversion for hash keys" do
+ entity = Taza::Entity.new({'fruits' => {'apple' => 'pie' }},nil)
+ entity.to_hash[:fruits][:apple].should eql('pie')
+ end
end