Sha256: 4c1a9477003314224ed4d4c22b2ba4ed008cc1dd01db5f53bcf58ee150bc5ab0
Contents?: true
Size: 548 Bytes
Versions: 5
Compression:
Stored size: 548 Bytes
Contents
require '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
5 entries across 5 versions & 1 rubygems