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

Version Path
intridea-tweetstream-0.1.1 spec/tweetstream/hash_spec.rb
intridea-tweetstream-0.1.3 spec/tweetstream/hash_spec.rb
intridea-tweetstream-0.1.4 spec/tweetstream/hash_spec.rb
intridea-tweetstream-0.1.5 spec/tweetstream/hash_spec.rb
tweetstream-1.0.5 spec/tweetstream/hash_spec.rb
tweetstream-1.1.0.rc2 spec/tweetstream/hash_spec.rb
tweetstream-1.1.0.rc1 spec/tweetstream/hash_spec.rb
xh5-tweetstream-1.1.0 spec/tweetstream/hash_spec.rb
tweetstream-1.0.4 spec/tweetstream/hash_spec.rb
tweetstream-1.0.3 spec/tweetstream/hash_spec.rb
tweetstream-1.0.2 spec/tweetstream/hash_spec.rb
tweetstream-1.0.1 spec/tweetstream/hash_spec.rb
tweetstream-1.0.0 spec/tweetstream/hash_spec.rb
tweetstream-0.3.0 spec/tweetstream/hash_spec.rb
tweetstream-0.1.9 spec/tweetstream/hash_spec.rb
tweetstream-0.1.8 spec/tweetstream/hash_spec.rb
tweetstream-0.1.7 spec/tweetstream/hash_spec.rb
tweetstream-0.1.5 spec/tweetstream/hash_spec.rb
tweetstream-0.1.4 spec/tweetstream/hash_spec.rb
tweetstream-0.1.3 spec/tweetstream/hash_spec.rb