diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/.rubocop.yml | 59 | ||||
-rw-r--r-- | spec/spec_helper.rb | 20 |
2 files changed, 79 insertions, 0 deletions
diff --git a/spec/.rubocop.yml b/spec/.rubocop.yml new file mode 100644 index 0000000..752f917 --- /dev/null +++ b/spec/.rubocop.yml @@ -0,0 +1,59 @@ +inherit_from: ../.rubocop.yml + +Layout/ClosingParenthesisIndentation: + Enabled: false + +Layout/EmptyLines: + Enabled: false + +Layout/EmptyLinesAroundBlockBody: + Enabled: false + +Layout/LeadingCommentSpace: + Enabled: false + +Layout/MultilineBlockLayout: + Enabled: false + +Layout/SpaceBeforeComma: + Enabled: false + +Layout/SpaceBeforeComment: + Enabled: false + +Layout/SpaceInsideBlockBraces: + Enabled: false + +Layout/SpaceInsideBrackets: + Enabled: false + +Layout/SpaceInsideParens: + Enabled: false + +Lint/AmbiguousRegexpLiteral: + Enabled: false + +Metrics/ModuleLength: + Enabled: false + +Metrics/BlockLength: + Enabled: false + +Style/BlockDelimiters: + IgnoredMethods: [ expect, let ] + +# I use it for purpose with Corefines, e.g. `using Corefines::String::unindent`. +Style/ColonMethodCall: + Enabled: false + +Style/FrozenStringLiteralComment: + Enabled: false + +Style/NestedParenthesizedCalls: + Enabled: false + +Style/SymbolArray: + Enabled: false + +Style/WordArray: + Enabled: false diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..80e5bc6 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,20 @@ +require 'rspec' + +RSpec.configure do |config| + config.color = true +end + +unless RUBY_ENGINE == 'jruby' + require 'simplecov' + + formatters = [SimpleCov::Formatter::HTMLFormatter] + if ENV['CODACY_PROJECT_TOKEN'] + require 'codacy-coverage' + formatters << Codacy::Formatter + end + + SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(formatters) + SimpleCov.start do + add_filter '/spec/' + end +end |