From a0f98d888a98e348e0dfede1ba8d45dfc2c60f7e Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Tue, 12 Apr 2011 16:21:42 -0700 Subject: Try to fix annoying xml time spec failure --- spec/lib/diaspora/exporter_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'spec/lib') 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 -- cgit v1.2.3