Sha256: 011321c08f5294fc8057bfa008aa320f897bf259c063cb6b859efa051a23792d
Contents?: true
Size: 583 Bytes
Versions: 23
Compression:
Stored size: 583 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe TweetStream::Hash do it 'should be initialized by passing in an existing hash' do TweetStream::Hash.new(:abc => 123)[:abc].should == 123 end it 'should symbolize incoming keys' do TweetStream::Hash.new('abc' => 123)[:abc].should == 123 end it 'should allow access via method calls' do TweetStream::Hash.new(:abc => 123).abc.should == 123 end it 'should still throw NoMethod for non-existent keys' do lambda{TweetStream::Hash.new({}).akabi}.should raise_error(NoMethodError) end end
Version data entries
23 entries across 23 versions & 3 rubygems