Skip to content

Instantly share code, notes, and snippets.

@adamjleonard
Created February 17, 2012 17:45
Show Gist options
  • Save adamjleonard/1854567 to your computer and use it in GitHub Desktop.
Save adamjleonard/1854567 to your computer and use it in GitHub Desktop.
Test is failing on comparing the two and I believe it's due to the ids of the PieceTypeCommoditys. Not sure how to go about making it not compare the ids.
'PieceTemplate#grouped_piece_type_commodities one piece with two commodities that are the same should return one commodity with count 2' FAILED
expected: [{:count=>2, :commodity=>#<PieceTypeCommodity id: 352, name: "Beer", packaging_type_id: nil, created_at: "2012-02-17 17:41:40", updated_at: "2012-02-17 17:41:40", weight: #<BigDecimal:1055f7520,'0.567E2',18(18)>, weight_unit: "KGS", nmfc_number: nil, quantity: nil, commodity_class_id: nil, piece_type_id: 781>}],
got: [{:count=>2, :commodity=>#<PieceTypeCommodity id: 353, name: "Beer", packaging_type_id: nil, created_at: "2012-02-17 17:41:40", updated_at: "2012-02-17 17:41:40", weight: #<BigDecimal:1055f6120,'0.567E2',18(18)>, weight_unit: "KGS", nmfc_number: nil, quantity: nil, commodity_class_id: nil, piece_type_id: 781>}] (using ==)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment