Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorRaphael Sofaer <raphael@joindiaspora.com>2011-04-13 03:21:42 +0400
committerRaphael Sofaer <raphael@joindiaspora.com>2011-04-13 03:21:42 +0400
commita0f98d888a98e348e0dfede1ba8d45dfc2c60f7e (patch)
treeb60514c13b028b1b59ba2704271ca1408a0ef00b /spec/lib
parent8c0dcdde08faa5bb11637ff73e6bfb6fdda2c9c2 (diff)
Try to fix annoying xml time spec failure
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/diaspora/exporter_spec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/lib/diaspora/exporter_spec.rb b/spec/lib/diaspora/exporter_spec.rb
index 8223bf688..e31cd27e6 100644
--- a/spec/lib/diaspora/exporter_spec.rb
+++ b/spec/lib/diaspora/exporter_spec.rb
@@ -96,7 +96,8 @@ describe Diaspora::Exporter do
it 'should include post created at time' do
doc = Nokogiri::XML::parse(posts_xml)
- xml_time = Time.zone.parse(doc.xpath('//posts/status_message/created_at').first.text)
+ target_xml = doc.xpath('//posts/status_message').detect{|status| status.to_s.include?(@status_message1.text)}
+ xml_time = Time.zone.parse(target_xml.xpath('//status_message').text)
xml_time.to_i.should == @status_message1.created_at.to_i
end
end