diff options
author | Michael Herold <opensource@michaeljherold.com> | 2018-09-30 14:07:18 -0500 |
---|---|---|
committer | Michael Herold <opensource@michaeljherold.com> | 2018-09-30 14:59:58 -0500 |
commit | 5b5ed2119d63295fb180ecf1872b9e70e389c831 (patch) | |
tree | 3c80581ee004d9ad31f1981100852ff8063a3066 /spec/hashie/extensions/method_access_spec.rb | |
parent | 0235a18c14365b69773f99312bad590d0e66ee2d (diff) | |
download | hashie-5b5ed2119d63295fb180ecf1872b9e70e389c831.tar.gz |
[rubocop] Improve our RuboCop setup
Disable Metrics/BlockLength in specs because the length of a block in
the test suite isn't something we want to lint. We want the tests to be
as long as they need to be.
Set an explicit line length metric instead of continually updating this
as we go. Let's pick a max line length that we want to see and stick
with it. This metric should only ever decrease: we don't want to see it
ever increase again.
Diffstat (limited to 'spec/hashie/extensions/method_access_spec.rb')
-rw-r--r-- | spec/hashie/extensions/method_access_spec.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/hashie/extensions/method_access_spec.rb b/spec/hashie/extensions/method_access_spec.rb index dcd049d..b749098 100644 --- a/spec/hashie/extensions/method_access_spec.rb +++ b/spec/hashie/extensions/method_access_spec.rb @@ -128,7 +128,14 @@ describe Hashie::Extensions::MethodAccess do it 'includes all of the other method mixins' do klass = Class.new(Hash) klass.send :include, Hashie::Extensions::MethodAccess - expect((klass.ancestors & [Hashie::Extensions::MethodReader, Hashie::Extensions::MethodWriter, Hashie::Extensions::MethodQuery]).size).to eq 3 + + included_modules = klass.ancestors & [ + Hashie::Extensions::MethodReader, + Hashie::Extensions::MethodWriter, + Hashie::Extensions::MethodQuery + ] + + expect(included_modules.size).to eq 3 end end |