require 'spec_helper' describe StackExchange::StackOverflow::Question do it 'should return a question identified by its id (without body)' do question = StackOverflow::Question.find 1234 question.id.should == 1234 question.answer_count.should == 6 question.tags.should == ['csla'] question.creation_date.should == 1217857235 question.last_activity_date.should == 1236665990 question.up_vote_count.should == 2 question.down_vote_count.should be_zero question.view_count.should == 1081 question.score.should == 2 question.community_owned.should be_false question.accepted_answer_id.should == 1239 question.favorite_count.should == 1 question.question_timeline_url.should == "/questions/1234/timeline" question.question_comments_url.should == "/questions/1234/comments" question.question_answers_url.should == "/questions/1234/answers" question.owner.id.should == 296 question.owner.user_type.should == "registered" question.owner.display_name.should == "jdecuyper" question.owner.reputation.should == 1189 question.owner.email_hash.should == "21ae3e5f2968bc957b7a6fa709bea2a0" question.answers.should be_instance_of Array question.answers.size.should == 6 question.title.should == "CSLA Master Class" question.body.should be_nil end it 'should include body when using :query => { :body => true }' do question = StackOverflow::Question.find 1234, :query => { :body => true } question.body.should == "
Hi guys!\r\nAs anyone ever assisted the CSLA Master Class from Rockford Lhotka? (www).\r\n
\r\nIt seems a good way to enforce my OO knowledge in the asp.net field, but since I have to consider the flight to Atlanta and the course's price ($ 2.500), I'm not convinced yet.
\r\n
\r\nAlso, I could barrely find any feedback on the web.
\r\nCould anyone share some experience or comments?
\r\nThanks a lot.