Sha256: 94a1ee199e5fa3077d5b20bc6dbb5247c116dc87ce458ff27a4a21c3dc895774

Contents?: true

Size: 1009 Bytes

Versions: 2

Compression:

Stored size: 1009 Bytes

Contents

if ENV["CI"]
  require "simplecov"
  require "simplecov-lcov"

  SimpleCov::Formatter::LcovFormatter.config do |c|
    c.single_report_path = "coverage/lcov.info"
    c.report_with_single_file = true
  end

  SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
  SimpleCov.start do
    %w[spec].each do |ignore_path|
      add_filter(ignore_path)
    end
  end
end

$LOAD_PATH << File.expand_path(File.join("..", "..", "lib"), __FILE__)

require "chatwork"

require "rspec-parameterized"
require "rspec/its"
require "webmock/rspec"
require "active_support/all"

begin
  require "backport_dig"
rescue LoadError # rubocop:disable Lint/SuppressedException
end

Dir["#{__dir__}/support/**/*.rb"].sort.each {|f| require f }

def spec_dir
  Pathname(__dir__)
end

def schema_file
  spec_dir.join("../api/RAML/api-ja.raml")
end

RSpec.configure do |config|
  config.before(:suite) do
    raise "Not found '#{schema_file}'. Please run `git submodule update --init` at first" unless schema_file.exist?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
chatwork-1.0.1 spec/spec_helper.rb
chatwork-1.0.0 spec/spec_helper.rb