diff options
author | Jim Myhrberg <contact@jimeh.me> | 2013-03-02 15:54:09 +0000 |
---|---|---|
committer | Jim Myhrberg <contact@jimeh.me> | 2013-03-02 15:54:09 +0000 |
commit | 45aa48ff7cddb986070c38161cd04d175a7240aa (patch) | |
tree | e1004a461d4b0d3fe4a4a033955950ceb45b24de /spec/hashie/trash_spec.rb | |
parent | 17a8793ec9f3e64643f9b37bfc962080fe267456 (diff) | |
download | hashie-45aa48ff7cddb986070c38161cd04d175a7240aa.tar.gz |
Ensure #replace works with Hashie::Trash
Diffstat (limited to 'spec/hashie/trash_spec.rb')
-rw-r--r-- | spec/hashie/trash_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/hashie/trash_spec.rb b/spec/hashie/trash_spec.rb index 40d27c2..e57d4be 100644 --- a/spec/hashie/trash_spec.rb +++ b/spec/hashie/trash_spec.rb @@ -52,6 +52,16 @@ describe Hashie::Trash do trash.firstName = 'Franklin' trash.first_name.should == 'Franklin' end + + it 'writes to a translated property using #replace' do + trash.replace(:firstName => 'Franklin') + trash.first_name.should == 'Franklin' + end + + it 'writes to a non-translated property using #replace' do + trash.replace(:first_name => 'Franklin') + trash.first_name.should == 'Franklin' + end end describe ' initializing with a Hash' do |