From 8fabe3dbea9effd8ecbb0bfd3897f22dee1a8fb7 Mon Sep 17 00:00:00 2001 From: Yuri Smirnov Date: Fri, 31 Aug 2018 16:45:33 +0300 Subject: [PATCH] update rubocop --- .rubocop.yml | 6 ++++++ Gemfile | 2 ++ memery.gemspec | 2 +- spec/memery_spec.rb | 4 ++-- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 258f9d5..f4ac84f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,3 +4,9 @@ inherit_gem: AllCops: DisplayCopNames: true TargetRubyVersion: 2.5 + +Naming/UncommunicativeMethodParamName: + AllowedNames: ["x", "y", "z"] + +RSpec/EmptyLineAfterHook: + Enabled: false diff --git a/Gemfile b/Gemfile index bb94df8..a70284f 100644 --- a/Gemfile +++ b/Gemfile @@ -2,3 +2,5 @@ source "https://rubygems.org" gemspec + +gem "rubocop-config-umbrellio", github: "umbrellio/code-style" diff --git a/memery.gemspec b/memery.gemspec index 68b2d48..c1df0ba 100644 --- a/memery.gemspec +++ b/memery.gemspec @@ -1,6 +1,6 @@ # frozen_string_literal: true -lib = File.expand_path("../lib", __FILE__) +lib = File.expand_path("lib", __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "memery/version" diff --git a/spec/memery_spec.rb b/spec/memery_spec.rb index 21a2c57..8ef4400 100644 --- a/spec/memery_spec.rb +++ b/spec/memery_spec.rb @@ -78,11 +78,11 @@ class << self end RSpec.describe Memery do + subject(:a) { A.new } + before { CALLS.clear } before { B_CALLS.clear } - subject(:a) { A.new } - context "methods without args" do specify do values = [ a.m, a.m_nil, a.m, a.m_nil ]