I am using nokogiri, and I am comparing two hashes in full which on
reflection is not that good a way to test. (Nokogiri is replacing a
custom Perl parser).
Changing the test to:
should "have correct created_at time" do
assert_equal("2010-02-02 08:22:59", @result[:created_at])
end
from:
assert_equal( expected_hash, processed_hash)
avoids the problem, and makes for a more targeted test anyway.
Does not solve the mystery though.
I did try to distill the problem down. Comparing two hashes created
inside the test with the same values work fine. The hash returned from
the function is a Hash not a nokogiri object.
cheers,
Richard
On Sun, May 23, 2010 at 12:49 AM, Tim Uckun <[email protected]> wrote:
> On Sat, May 22, 2010 at 9:09 PM, Richard Hulse
> <[email protected]> wrote:
>> I am writing some tests (as I should) for some code that parses XML.
>
> Are you writing code to parse the XML yourself or are you using a
> library to parse it?
>
> --
> You received this message because you are subscribed to the Google Groups
> "WellRailed" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/wellrailed?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"WellRailed" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/wellrailed?hl=en.