forked from typesense/typesense-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec_helper.rb
42 lines (32 loc) · 987 Bytes
/
spec_helper.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# frozen_string_literal: true
require 'simplecov'
SimpleCov.start
if ENV['CI'] == 'true'
require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov
end
SimpleCov.start do
add_group 'lib', 'lib'
add_filter 'spec'
end
require 'bundler/setup'
require 'webmock/rspec'
require 'typesense'
require 'pry'
RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
config.example_status_persistence_file_path = '.rspec_status'
# Disable RSpec exposing methods globally on `Module` and `main`
config.disable_monkey_patching!
config.expect_with :rspec do |c|
c.syntax = :expect
end
config.expose_dsl_globally = true
# This config option will be enabled by default on RSpec 4,
# but for reasons of backwards compatibility, you have to
# set it on RSpec 3.
#
# It causes the host group and examples to inherit metadata
# from the shared context.
config.shared_context_metadata_behavior = :apply_to_host_groups
end