forked from livingsocial/swagger_yard
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathspec_helper.rb
43 lines (30 loc) · 1000 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
43
require 'simplecov'
SimpleCov.start do
add_filter '/spec/'
add_filter '/.bundle/'
end
ENV["RAILS_ENV"] = "development"
FIXTURE_PATH = Pathname.new(File.expand_path('../fixtures', __FILE__))
require 'bundler/setup'
Bundler.require
require 'rspec/its'
require 'apivore'
# we don't care about these hashie warnings in our test suite
Apivore::Swagger.disable_warnings
require File.expand_path('../../lib/swagger_yard', __FILE__)
require File.expand_path('../fixtures/dummy/config/initializers/swagger_yard.rb', __FILE__)
SwaggerYard.register_custom_yard_tags!
Dir["./spec/support/**/*.rb"].each {|f| require f}
RSpec.configure do |config|
config.run_all_when_everything_filtered = true
config.filter_run :focus
config.mock_with :mocha
config.order = 'random'
config.example_status_persistence_file_path = '.rspec_examples'
config.include SaveConfig
config.include YARDHelpers
config.after do
SwaggerYard::Handlers::DSLHandler.reset
YARD::Registry.clear
end
end