summaryrefslogtreecommitdiff
path: root/spec/hashie/mash_spec.rb
diff options
context:
space:
mode:
authorBobby McDonald <bobbymcwho@gmail.com>2019-10-17 23:51:50 -0400
committerBobby McDonald <bobbymcwho@gmail.com>2019-10-17 23:55:45 -0400
commit6a965273845f64605e0e951ac113a4383f7e8af5 (patch)
tree56c0f813cefe071fdcc25756275636c58e8beb3b /spec/hashie/mash_spec.rb
parent20e5467188bb4b6ab4166a72c07ec2bc0b883fa0 (diff)
downloadhashie-6a965273845f64605e0e951ac113a4383f7e8af5.tar.gz
Change rubocop to allow 100 character lines.
For accessibility reasons, we should limit our lines to 100 chars max. https://github.com/slack-ruby/slack-ruby-client/pull/293#discussion_r309472083
Diffstat (limited to 'spec/hashie/mash_spec.rb')
-rw-r--r--spec/hashie/mash_spec.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/hashie/mash_spec.rb b/spec/hashie/mash_spec.rb
index 77a1c6b..13ddef0 100644
--- a/spec/hashie/mash_spec.rb
+++ b/spec/hashie/mash_spec.rb
@@ -302,14 +302,16 @@ describe Hashie::Mash do
# http://www.ruby-doc.org/core-1.9.3/Hash.html#method-i-update
it 'accepts a block' do
- duped = subject.merge(details: { address: 'Pasadena CA' }) { |_, oldv, newv| [oldv, newv].join(', ') }
+ duped = subject.merge(details: { address: 'Pasadena CA' }) do |_, oldv, newv|
+ [oldv, newv].join(', ')
+ end
+
expect(duped.details.address).to eq 'Nowhere road, Pasadena CA'
end
it 'copies values for non-duplicate keys when a block is supplied' do
- duped =
- subject
- .merge(details: { address: 'Pasadena CA', state: 'West Thoughtleby' }) { |_, oldv, _| oldv }
+ m_hash = { details: { address: 'Pasadena CA', state: 'West Thoughtleby' } }
+ duped = subject.merge(m_hash) { |_, oldv, _| oldv }
expect(duped.details.address).to eq 'Nowhere road'
expect(duped.details.state).to eq 'West Thoughtleby'