Sha256: 643490c5974785acac08e401d50acc72410a360d51bf37e5d125aea418987531
Contents?: true
Size: 1.17 KB
Versions: 66
Compression:
Stored size: 1.17 KB
Contents
require 'spec_helper' describe FbGraph::QuestionOption do describe '.new' do it 'should setup all supported attributes' do attributes = { :id => '12345', :from => { :id => '23456', :name => 'Mahmoud Khaled' }, :name => 'option 1', :votes => 5, :object => {:name => "Ruby programming language", :category => "Interest", :id => "109932262369283" }, :created_time => '2009-12-29T15:24:50+0000' } question = FbGraph::QuestionOption.new(attributes.delete(:id), attributes) question.identifier.should == '12345' question.from.should == FbGraph::User.new('23456', :name => 'Mahmoud Khaled') question.name.should == 'option 1' question.vote_count.should == 5 question.object.should be_instance_of(FbGraph::Page) question.object.name.should == "Ruby programming language" question.object.category.should == "Interest" question.object.identifier.should == "109932262369283" question.created_time.should == Time.parse('2009-12-29T15:24:50+0000') end end end
Version data entries
66 entries across 66 versions & 1 rubygems