summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-01-26 00:53:22 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-01-30 19:38:22 +0100
commita8e82ba99adf1a2a34b136388b088dcfe60d9593 (patch)
tree567a509fe479ca4d8ed638c06dc54356caa3890f /spec
parentad3b8da957176360566d678437e10284fc1b8f2c (diff)
Prepare project structure
Diffstat (limited to 'spec')
-rw-r--r--spec/.rubocop.yml59
-rw-r--r--spec/spec_helper.rb20
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