summaryrefslogtreecommitdiff
path: root/spec/hashie/extensions/method_access_spec.rb
diff options
context:
space:
mode:
authorMichael Herold <opensource@michaeljherold.com>2018-09-30 14:07:18 -0500
committerMichael Herold <opensource@michaeljherold.com>2018-09-30 14:59:58 -0500
commit5b5ed2119d63295fb180ecf1872b9e70e389c831 (patch)
tree3c80581ee004d9ad31f1981100852ff8063a3066 /spec/hashie/extensions/method_access_spec.rb
parent0235a18c14365b69773f99312bad590d0e66ee2d (diff)
downloadhashie-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.rb9
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