From 8d61fb0aeb8e739162419a6fe0a3308357b38884 Mon Sep 17 00:00:00 2001
From: ilya <ilya@laptop.(none)>
Date: Sun, 24 Oct 2010 01:45:26 -0700
Subject: [PATCH] tiny bug in the spec

---
 spec/lib/diaspora/parser_spec.rb | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/spec/lib/diaspora/parser_spec.rb b/spec/lib/diaspora/parser_spec.rb
index f97a514c37..a3c1609cdd 100644
--- a/spec/lib/diaspora/parser_spec.rb
+++ b/spec/lib/diaspora/parser_spec.rb
@@ -15,13 +15,14 @@ describe Diaspora::Parser do
   describe "parsing compliant XML object" do
     it 'should be able to correctly handle comments with person in db' do
       post = user.post :status_message, :message => "hello", :to => aspect.id
-      comment = Factory.build(:comment, :post => post, :person => @person, :text => "Freedom!")
+      comment = Factory.build(:comment, :post => post, :person => person, :text => "Freedom!")
+      comment.delete
       xml = comment.to_diaspora_xml
 
-      comment = Diaspora::Parser.from_xml(xml)
-      comment.text.should == "Freedom!"
-      comment.person.should == @person
-      comment.post.should == post
+      comment_from_xml = Diaspora::Parser.from_xml(xml)
+      comment_from_xml.text.should == "Freedom!"
+      comment_from_xml.person.should == person
+      comment_from_xml.post.should == post
     end
 
     it 'should be able to correctly handle person on a comment with person not in db' do
-- 
GitLab