From 6198978fa23e7acc22bc0196db9315a60bea52d0 Mon Sep 17 00:00:00 2001 From: Larry Lv Date: Tue, 20 May 2014 01:36:41 +0800 Subject: Make tests for `Person` pass. --- test/models/person.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/models/person.rb b/test/models/person.rb index fb12c1c614..a5bdbc462b 100644 --- a/test/models/person.rb +++ b/test/models/person.rb @@ -2,18 +2,18 @@ require 'active_model/global_identification' class Person include ActiveModel::GlobalIdentification - + attr_reader :id - + def self.find(id) new(id) end - + def initialize(id) @id = id end - + def ==(other_person) - other_person.is_a?(Person) && id == other_person.id + other_person.is_a?(Person) && id.to_s == other_person.id.to_s end end -- cgit v1.2.3