Skip to content

Commit 33f1593

Browse files
committed
Fix specs for dumping field of custom type
1 parent f2bc707 commit 33f1593

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spec/fixtures/dumping.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def initialize(name)
3434
end
3535

3636
def dynamoid_dump
37-
name + ' (dumped with #dynamoid_dump)'
37+
"#{name} (dumped with #dynamoid_dump)"
3838
end
3939

4040
def eql?(other)
@@ -46,7 +46,7 @@ def hash
4646
end
4747

4848
def self.dynamoid_dump(user)
49-
user.name + ' (dumped with .dynamoid_dump)'
49+
"#{user.name} (dumped with .dynamoid_dump)"
5050
end
5151

5252
def self.dynamoid_load(string)
@@ -77,7 +77,7 @@ def self.dynamoid_dump(user)
7777
end
7878

7979
def self.dynamoid_load(string)
80-
User.new(string.to_s)
80+
UserValue.new(string.to_s)
8181
end
8282
end
8383

@@ -87,8 +87,8 @@ def self.dynamoid_dump(user)
8787
end
8888

8989
def self.dynamoid_load(array)
90-
array = array.name.split if array.is_a?(User)
91-
User.new(array.join(' '))
90+
array = array.name.split if array.is_a?(UserValue)
91+
UserValue.new(array.join(' '))
9292
end
9393

9494
def self.dynamoid_field_type

0 commit comments

Comments
 (0)