spec/entity_spec.rb in taza-0.8.5 vs spec/entity_spec.rb in taza-0.8.6
- old
+ new
@@ -10,6 +10,16 @@
it "should be accessible like a hash(foo[:bar])" do
entity = Taza::Entity.new({:apple => 'pie'},nil)
entity[:apple].should eql('pie')
end
+ it "should be able to define methods for multiple levels" do
+ entity = Taza::Entity.new({:fruits => {:apple => 'pie'} },nil)
+ entity.fruits.apple.should eql('pie')
+ end
+
+ 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
+
end