Sha256: 8f0c20c5a32c51fc131cb9dbb7680d5e7a783e9e4b10ac86e17c11cf89657a95
Contents?: true
Size: 919 Bytes
Versions: 30
Compression:
Stored size: 919 Bytes
Contents
require File.join(File.dirname(__FILE__), '../spec_helper') describe FbGraph::Tag, '.new' do it 'should setup all supported attributes' do attributes = { :id => "7901103", :name => "Arjun Banker", :x => 32.5, :y => 27.7778, :created_time => "2010-04-22T08:24:26+0000" } tag = FbGraph::Tag.new(attributes) tag.user.should == FbGraph::User.new('7901103', :name => "Arjun Banker") tag.name.should == 'Arjun Banker' tag.x.should == 32.5 tag.y.should == 27.7778 tag.created_time.should == Time.parse("2010-04-22T08:24:26+0000") end it 'should not setup user if id is blank' do attributes = { :id => "", :name => "Arjun Banker", :x => 32.5, :y => 27.7778, :created_time => "2010-04-22T08:24:26+0000" } tag = FbGraph::Tag.new(attributes) tag.user.should be_nil tag.name.should == 'Arjun Banker' end end
Version data entries
30 entries across 30 versions & 1 rubygems