rapid7/metasploit-framework — pull request #4230 by todb-r7 (2014-11-18 19:13:52+00:00)
Title: Fix DateTime string/ActiveRecord agreement

Without this, it appears that some systems (notably, Travis-CI) can end up parsing strings and DateTime objects slightly differently. The last failure was https://gist.github.com/todb-r7/6206b698cfbd39b82a2f :

````
Msf::DBManager::Export ....................F...
1) Msf::DBManager::Export#extract_module_detail_info with Mdm::Module::Details module_detail /disclosure-date should have Mdm::Module::Detail#disclosure_date from disclosure-date content
Failure/Error: DateTime.parse(node.content).should == module_detail.disclosure_date
expected: Thu, 05 Jun 2014 00:00:00 UTC +00:00
got: Wed, 04 Jun 2014 00:00:00 +0000 (using ==)
Diff:
@@ -1,2 +1,2 @@
-Thu, 05 Jun 2014 00:00:00 UTC +00:00
+Wed, 04 Jun 2014 00:00:00 +0000

# ./spec/lib/msf/db_manager/export_spec.rb:82:in `block (6 levels) in '
````

Note the UTC vs no UTC business there.

per Travis job:

https://travis-ci.org/rapid7/metasploit-framework/jobs/41383222

on build 10222

This is fixed by ensuring both sides of the `.should ==` are normalized with `DateTime` (the explicit `.to_s` is required to avoid an ActiveRecord warning).

## Verification

- [ ] See a green travis build