diff --git a/.rubocop.yml b/.rubocop.yml index 73f287e..2e62f76 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,6 +2,7 @@ AllCops: TargetRubyVersion: 2.3 Exclude: + - "bin/**/*" - "spec/dummy/bin/**/*" - "tmp/**/*" - "vendor/**/*" diff --git a/letter_opener_web.gemspec b/letter_opener_web.gemspec index 79762f7..7b7aced 100644 --- a/letter_opener_web.gemspec +++ b/letter_opener_web.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 'letter_opener_web/version' diff --git a/spec/models/letter_opener_web/letter_spec.rb b/spec/models/letter_opener_web/letter_spec.rb index 0ef43cb..84aaf1f 100644 --- a/spec/models/letter_opener_web/letter_spec.rb +++ b/spec/models/letter_opener_web/letter_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true describe LetterOpenerWeb::Letter do - let(:location) { File.expand_path('../../../tmp', __FILE__) } + let(:location) { File.expand_path('../../tmp', __dir__) } def rich_text(mail_id) <<-MAIL diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 94a80d1..3f6d2a6 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true ENV['RAILS_ENV'] ||= 'test' -require File.expand_path('../dummy/config/environment', __FILE__) +require File.expand_path('dummy/config/environment', __dir__) require 'spec_helper' require 'rspec/rails'