From 5444782ead74ee4b504bd3403fba3914dac1c758 Mon Sep 17 00:00:00 2001 From: cn Date: Fri, 25 Dec 2020 18:05:41 +0100 Subject: [PATCH] gems: include rubocop-rspec and fix linting --- .rubocop.yml | 7 +++++++ dyndnsd.gemspec | 1 + spec/{ => dyndnsd}/daemon_spec.rb | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) rename spec/{ => dyndnsd}/daemon_spec.rb (99%) diff --git a/.rubocop.yml b/.rubocop.yml index 55170a0..b0b0db0 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,6 @@ require: - rubocop-rake +- rubocop-rspec AllCops: TargetRubyVersion: '2.5' @@ -89,3 +90,9 @@ Style/SymbolArray: Style/TrailingCommaInArrayLiteral: Enabled: false + +RSpec/ExampleLength: + Max: 20 + +RSpec/MultipleExpectations: + Max: 20 diff --git a/dyndnsd.gemspec b/dyndnsd.gemspec index c115bdc..b8cee6f 100644 --- a/dyndnsd.gemspec +++ b/dyndnsd.gemspec @@ -42,5 +42,6 @@ Gem::Specification.new do |s| s.add_development_dependency 'rspec' s.add_development_dependency 'rubocop', '~> 1.6.1' s.add_development_dependency 'rubocop-rake', '~> 0.5.1' + s.add_development_dependency 'rubocop-rspec', '~> 2.1.0' s.add_development_dependency 'solargraph', '~> 0.40.0' end diff --git a/spec/daemon_spec.rb b/spec/dyndnsd/daemon_spec.rb similarity index 99% rename from spec/daemon_spec.rb rename to spec/dyndnsd/daemon_spec.rb index b667167..1936805 100644 --- a/spec/daemon_spec.rb +++ b/spec/dyndnsd/daemon_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative 'spec_helper' +require_relative '../spec_helper' describe Dyndnsd::Daemon do include Rack::Test::Methods