aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/models/person.rb10
1 files changed, 5 insertions, 5 deletions
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