spec/awestruct/astruct_spec.rb in awestruct-0.5.6.beta9 vs spec/awestruct/astruct_spec.rb in awestruct-0.5.6

- old
+ new

@@ -8,9 +8,16 @@ s = Awestruct::AStruct.new( :foo=>'bar', 'taco'=>'tasty' ) s[:foo].should == 'bar' s['taco'].should == 'tasty' end + it "should not have org, com, java defined" do + s = Awestruct::AStruct.new + s.java.should be_nil + s.com.should be_nil + s.org.should be_nil + end + it "should allow access to members through indifferent hash access" do s = Awestruct::AStruct.new( :foo=>'bar', 'taco'=>'tasty' ) s['foo'].should == 'bar' s[:foo].should == 'bar'