spec/entity_spec.rb in taza-0.8.4 vs spec/entity_spec.rb in taza-0.8.5
- old
+ new
@@ -1,9 +1,15 @@
require 'spec/spec_helper'
-require 'taza'
+require 'taza/entity'
describe Taza::Entity do
it "should add methods for hash string keys" do
entity = Taza::Entity.new({'apple' => 'pie'},nil)
entity.should respond_to(:apple)
end
-end
\ No newline at end of file
+
+ it "should be accessible like a hash(foo[:bar])" do
+ entity = Taza::Entity.new({:apple => 'pie'},nil)
+ entity[:apple].should eql('pie')
+ end
+
+end